From https://docs.docker.com/engine/reference/builder/#entrypoint :
The shell form:
ENTRYPOINT command param1 param2
The shell form prevents any CMD or run command line arguments from being used, but has the disadvantage that your ENTRYPOINT will be started as a subcommand of /bin/sh -c
From man sh
:
-c Read commands from the command_string operand. Set the value of special parameter 0 (see Section 2.5.2, Special Parameters) from the
value of the command_name operand and the positional parameters ($1, $2, and so on) in sequence from the remaining argument operands.
No commands shall be read from the standard input.
/bin/sh -c echo helloworld
should assign helloworld
to shells $0
and execute echo
, which will output an empty line.
I.e. ENTRYPOINT ["echo"]
is not ENTRYPOINT echo
.