Summary
In this chapter, we learned how to create container images for applications. We started with an overview of CoW filesystems, which are the base for creating container images using layers. We looked at different methods to build images, along with their pros, cons, and examples. Using Dockerfiles is the best method because it provides a reproducible way of creating images by using different steps, written in order in these files. We provided a quick overview of the most important directives we can use in Dockerfiles and the command line and the arguments for using them. As the container-image-building process can be tricky, we presented some advanced features and practices we can use to improve our workflow in terms of speed, reusability, and quality.
In the next chapter, we will provide a quick overview of image registries, learn how to store and tag our images in them, and learn how to improve integrity and security by signing and scanning container images.