My container is being built and deployed on the AWS EKS k8s cluster by helm charts, which also sets the environment variable in the container.
In the Dockerfile that is used to build the image, I want to run a init shell script in the ENTRYPOINT directive at the last (which is run at the start of the container) for some initial configurations.
Can the shell script have access to the env variable set by the helm charts in the container so that I can have env-specific branches/conditions in the shell script?
CodePudding user response:
Yes, but keep in mind a Helm Chart (as illustrated here) which would override the ENTRYPOINT
you defined in your Dockerfile for building your image.
Other than that, at runtime, the ENTRYPOINT
script will have access to the environment setup by the package manager (Helm) in charge of executing a docker run
on your image.