jwillmer
jwillmer

Reputation: 3790

How to configure docker entrypoint in Helm charts

I have the following docker-compose file and I don't get how I can set the working_dir and entrypoint in the helm deployment.yaml. Does someone have an example on how to do this?

docker-compose

version: "3.5"
services:               
    checklist:
        image: ...
        working_dir: /checklist
        entrypoint: ["dotnet", "Checklist.dll"]        
        ...

Upvotes: 8

Views: 17087

Answers (2)

StefanFFM
StefanFFM

Reputation: 1898

I'm adding another answer as the existing one did not work for me (in Open Shift), it resulted in the error:

starting container process caused "exec: \"dotnet Checklist.dll\": executable file not found in $PATH"

What worked for me was overriding the entry point like this:

containers:
        - name: {{ .Chart.Name }}
          command: "dotnet"
          args: "Checklist.dll"

Upvotes: 1

Pierre B.
Pierre B.

Reputation: 12933

Helm uses Kubernetes Deployment with a different terminology than Docker. You'll want to define:

  • command in Helm for entrypoint in Docker Compose (see this post)
  • workingDir in Helm for working_dir in Docker Compose (see this post)

For your example it would be:

...
containers:
 - name: checklist
   ...
   command: ["dotnet", "Checklist.dll"] # Docker entrypoint equivalent
   workingDir: "/checklist" # Docker working_dir equivalent

Upvotes: 9

Related Questions