Image

Default Applications in Docker

The goal of Docker containers is to let you select pieces of technical infrastructure as if you were pulling items off of a shelf. Toward that end, each container image can be configured with a default application to invoke when started with a docker run or as part of a container set with docker-compose up.

In this tutorial, we'll:

  • Describe the difference between the build-time and runtime environment of a container
  • Use the CMD directive to specify a default command to execute
  • Introduce the ENTRYPOINT directive and set a default shell in which to run your CMD