Summary
In this chapter, we looked at Dockerfiles, which I am sure you will agree are a straightforward way of defining you own Docker images.
Once we finished our in-depth look at Dockerfiles, we then looked at five ways in which we can build your images. We started by looking at using a Dockerfile as this is the most common way you will be building your images and we will be using it throughout the rest of this book.
Then we discussed using an existing container as when Docker first came on the scene, this was the way most people originally built their images. It is no longer considered a best practice and should only ever be used if you need to create a snapshot of a running or crashed container for debug purposes.
Next up we talked about using scratch as a base. This is probably the most streamlined way of creating an image as you are literally starting from zero.
We moved onto discussing using environmental variables. Here, we looked at the ways we can start to introduce...