English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Docker commit command

Docker Command大全

docker commit :Create a new image from a container.

Syntax

docker commit [OPTIONS] CONTAINER [REPOSITORY[:TAG]]

OPTIONS description:

  • -a :The author of the submitted image;

  • -c :Use Dockerfile instructions to create an image;

  • -m :Description text at commit time;

  • -p :Pause the container when committing.

Online Examples

Pause container a404c6c174codebox:~$ docker images mymysql:v2  Save as a new image and add submitter information and description.

w3IMAGE ID3codebox:~$ docker commit -a "oldtoolbag.com" -m "my apache" a404c6c174codebox:~$ docker images mymysql:v2  mymysql:v1 
sha256:37af1236adef1544c08886a2301000b66577647codebox:~$ docker images mymysql:v4ee2codebox@w885codebox:~$ docker images mymysql:v66SIZE33CREATED28057
w3IMAGE ID3TAG1
REPOSITORY
mymysql1                  37af1236adef        15 seconds ago      329 MB

Docker Command大全