Docker commit command
docker commit: Create a new image from the container.
grammar
docker commit [OPTIONS] CONTAINER [REPOSITORY[:TAG]]
OPTIONS Description:
-a: Submit mirror author;
-c: Use Dockerfile instructions to create a mirror;
-m: when submitting captions;
-p: when you commit, the container is suspended.
Examples
The vessel a404c6c174a2 saved as a new image, and add the author information and instructions.
w3big@w3big:~$ docker commit -a "w3big.com" -m "my apache" a404c6c174a2 mymysql:v1 sha256:37af1236adef1544e8886be23010b66577647a40bc02c0885a6600b33ee28057 w3big@w3big:~$ docker images mymysql:v1 REPOSITORY TAG IMAGE ID CREATED SIZE mymysql v1 37af1236adef 15 seconds ago 329 MB