by timwis · 5y ago · 0 comments
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
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.
Docker compose has the key word as well.