Understanding containers and images
One of the easiest ways to build, deploy, and manage a web application is through the use of containers. We can think of containers as buckets or vessels containing all items that make up a web application but in the form of an Operating System (OS) virtualization. Think back for a moment to the previous chapter—Chapter 11, Deploying Models with Flask—in which we created a virtual environment to better maintain the packages we needed to install for the application. Containers can be thought of in quite a similar way, only on the OS level.
Containers consist of a number of items such as executables, libraries, binary code, and much more. Given that they do not contain some of the heavier items servers tend to have such as OS images, they are considered to have less overhead, making them more lightweight. Since these lightweight containers are considered to be packaged up and ready to go, developers (or automated systems) are able...