docker commit

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:

  1. Create a container using the following command. This creates an instance of Windows Server Core and ...

Get Learning Windows Server Containers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.