'dockerfile cmd is ignored
I have a container running in a kubernetes pod. Commands from dockerfile of my image in this container doesn't seem to be executing during deployment/startup. The base image used has a dockerfile and I can see the output from that, but not from my image. I can see that the CMD commands are getting added during docker build, but not sure why they aren't running. I dont see any errors in the pod logs either.
base image
|
|_ Dockerfile
my_image
|
|_ Dockerfile.production
base image: Dockerfile
ENTRYPOINT ["/entrypoint.sh"]
CMD ["/bin/bash", "/somescript.sh"]
my_image: Dockerfile.production:
FROM base-image
CMD [ "/bin/bash", "-c", "echo Hello from my_image!!!" ]
deployment manifest:
command:
- bash
- -ce
- |
. /entrypoint.sh
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
