Automated image building
There are many ways we can go about automating our processes for building container images; too many to reasonably provide a full disclosure of approaches within a single book. In later chapters of this book, we will delve more deeply into a range of automation options and tools. In this particular instance, we are only speaking of automation using our Dockerfile. We have already discussed in general that Dockerfiles can be used in automating our image building, so let's take a more dedicated look into Dockerfile automation specifically.
Unit tested deployments
During the build process, Docker allows us to run any command. Let's take advantage of this to enable unit tests while building our image. These unit tests can help to identify problems in our production image before we push them to staging or deployment, and will at least partially verify the image functions the way we intend and expect. If the unit tests run successfully, we have a degree of confidence...