Defining the Container Process
CMD supplies the default command or arguments. ENTRYPOINT defines the executable that the container is intended to run. The JSON exec form is generally preferable because it avoids an extra shell process and preserves signals correctly.
A common pattern is an executable ENTRYPOINT with CMD providing default arguments. Remember that a container should normally have one clear foreground process responsible for its lifecycle.