docker commit : Create a new image from the container. OPTIONS description: -a : Submitted mirror author -c : Use the Dockerfile directive to create a mirror -m : Description at the time of submission -p : During commit, pause the container. Save the container a404c6c174a2 as a new image and add the author information and description information. 2.46.1. Grammar ¶
docker commit [OPTIONS] CONTAINER [REPOSITORY[:TAG]]
2.46.2. Example ¶
runoob@runoob:~$ docker commit -a "runoob.com" -m "my apache" a404c6c174a2 mymysql:v1
sha256:37af1236adef1544e8886be23010b66577647a40bc02c0885a6600b33ee28057
runoob@runoob:~$ docker images mymysql:v1
REPOSITORY TAG IMAGE ID CREATED SIZE
mymysql v1 37af1236adef 15 seconds ago 329 MB