Docker Entrypoint overridden by k8s command
#13298
-
Hi Team! Could you, please, advise? Is there any way to not duplicate the entrypoint that was specified in Dockerfile. Sample example of Dockerfile: FROM ubuntu:14.04
ENTRYPOINT ["echo", "Hello"] Sample workflow: metadata:
name: test
namespace: argo-workflows
spec:
entrypoint: test
templates:
- name: test
container:
name: main
image: <custom_image>
command:
- "World" Getting the error:
Why it's not recognizing the "echo", "Hello" entrypoint from Docker image? What can be done to make it work? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I think you've fallen into a common misunderstanding of the Docker vs. k8s terminology. Docker's The terminology is unfortunately pretty confusing so this happens quite often. So your args:
- "World" |
Beta Was this translation helpful? Give feedback.
I think you've fallen into a common misunderstanding of the Docker vs. k8s terminology. Docker's
ENTRYPOINT
is equivalent to k8s'scommand
, and Docker'sCMD
is equivalent to k8s'sargs
.The terminology is unfortunately pretty confusing so this happens quite often.
To be explicit, that's not an Argo error or specific to Argo, that's just Kubernetes functionality. If you run a plain
Pod
in Kubernetes with that image and thatcommand
, you'll get the same errorSo your
command: - "World"
is actually overriding yourENTRYPOINT ["echo", "Hello"]
. If you want to print "Hello World", you probably want to useargs
and notcommand
: