Last updated February 23, 2018

One of the primary goals of Docker is to make it as easy to try out and deploy technical infrastructure as it is to pull an item off of a store shelf. But how are these containers built in the first place? A Docker image is built from a Dockerfile, a kind of container source code. The Dockerfile describes how to build and configure a single container.

In this tutorial, we'll:

  • Introduce Dockerfiles and see how Docker uses them to build container images
  • Outline the general structure of a Dockerfile
  • Describe how to build a new image from a Dockerfile