As explained in the previous sections, there are primarily two ways to create an image. While Dockerfile and docker build together allows us to create an image using a completely scripted approach, docker commit allows us to convert an existing container to an image. It also gives you an option to update the existing container's Dockerfile using the command-line arguments.
For example, the following set of commands create a container from scratch and then convert the container into a redistributable image. In this example, we will install a Redis on our container and convert it into an image to reuse in the following chapters:
- Create a container using the following command. This creates an instance of Windows Server Core and ...