July 2017
Intermediate to advanced
656 pages
16h 1m
English
What if we want to persist our changes to a container? We can do that too.
Assuming we've been following along in the previous section (Entering a containers shell environment) let's exit from the Mongo container and execute the following commands on the host system:
$ docker commit <container id> mymongo$ docker images
We can now see a fresh container image named mymongo in the Docker image list. This technique can be useful. For example, creating a database container with pre-populated test data for sharing among a development team.