2 ms·
> Putting the binary in entrypoint instead of CMD seems like a misuse of what CMD was intended for, no? No. From Docker's official reference: > The main pur
by rualca 6y ago
>
Putting the binary in entrypoint instead of CMD seems like a misuse of what CMD was intended for, no?
No. From Docker's official reference:
> The main purpose of a CMD is to provide defaults for an executing container. These defaults can include an executable, or they can omit the executable, in which case you must specify an ENTRYPOINT instruction as well.
https://docs.docker.com/engine/reference/builder/#cmd https://docs.docker.com/engine/reference/builder/#cmd
ENTRYPOINT should point to the entrypoint, and CMD should store default command line arguments. This allows a container image to be executed as a command line application.