In this chapter I took a closer look at Docker images and containers. Images are packaged versions of applications, and containers are instances of an application, run from an image. You can use containers to do simple fire-and-forget tasks, work with them interactively, or have them running in the background. As you start to use Docker more, you'll find yourself doing all three.
The Dockerfile is the source script for building an image. It's a simple text file with a small number of instructions to specify a base image, copy files, and run commands. You use the Docker command-line to build the image, which is very easy to add as a step to your CI build. When a developer pushes code that passes all the tests, the output of the build will be a versioned Docker image, which you can deploy to any host knowing that it will always run in the same way.
I looked at...