Summary
In this chapter, we discussed what container images are and how we can build and ship them. As we have seen, there are three different ways that an image can be created – either manually, automatically, or by importing a tarball into the system. We also learned some of the best practices commonly used when building custom images. Finally, we got a quick introduction to how to share or ship custom images by uploading them to a container image registry such as Docker Hub.
In the next chapter, we’re going to introduce Docker volumes, which can be used to persist the state of a container. We’ll also show you how to define individual environment variables for the application running inside the container, as well as how to use files containing whole sets of configuration settings.