How it works...
In Chapter 1, Introduction and Installation, we learned that Docker images are layered and that each layer is stacked on top of its parent image. When we start a container, a read/write ephemeral filesystem layer gets created. The changes to the filesystem (that is, the addition, modification, or deletion of files) through the apt-get update and install commands are preserved in this read/write ephemeral filesystem layer. If we stop and delete the container, the ephemeral layer associated with that container is removed and, essentially, we lose all the changes we applied to the container.
In this recipe, we persisted the container's ephemeral layer by using the docker container commit command. In effect, the commit operation ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access