March 2017
Beginner to intermediate
925 pages
18h 11m
English
There are a couple of ways to create images, one is by manually committing layers and the other way is through Dockerfiles. In this recipe, we'll see the former and look at Dockerfiles later in the chapter.
As we start a new container, a read/write layer gets attached to it. This layer will get destroyed if we do not save it. In this recipe, we will see how to save that layer and make a new image from the running or stopped container using the docker commit command.
To get a Docker image, start a container with it.
docker commit -a|--author[=""] -m|--message[=""] CONTAINER [REPOSITORY[:TAG]]
Read now
Unlock full access