In a Dockerfile the main purpose of a CMD is to provide defaults for an executing container. This is the default command to be run by the entrypoint. An ENTRYPOINT helps you to configure a container that you can run as an executable. Several Docker images use a default entry point of /bin/sh -c.