目录

Docker Commit镜像

目录
docker commit 提交容器成为一个新的副本

docker commit -m="提交的描述信息" -a="作者" 容器Id 目标镜像名:[TAG]

docker commit -m="add webapps" -a="CCCZG" ba4efec0c5d4 mytomcat:1.0
sha256:1ec080b97e83b548a8ebb8152bfb5f3b747d7f27f0bcd565fb088361e9f1b0d9
mac@MacdeMacBook-Pro ~ % docker ps
CONTAINER ID   IMAGE                 COMMAND             CREATED         STATUS         PORTS                                       NAMES
ba4efec0c5d4   tomcat                "catalina.sh run"   3 minutes ago   Up 3 minutes   0.0.0.0:8080->8080/tcp, :::8080->8080/tcp   naughty_noether
85a4e70072e5   portainer/portainer   "/portainer"        5 hours ago     Up 5 hours     0.0.0.0:8088->9000/tcp, :::8088->9000/tcp   elated_cerf
mac@MacdeMacBook-Pro ~ % docker images
REPOSITORY            TAG       IMAGE ID       CREATED         SIZE
mytomcat              1.0       1ec080b97e83   9 seconds ago   672MB
tomcat                latest    c43a65faae57   9 days ago      667MB
redis                 latest    bc8d70f9ef6c   10 days ago     105MB
nginx                 latest    f0b8a9a54136   11 days ago     133MB
mysql                 latest    c0cdc95609f1   11 days ago     556MB
portainer/portainer   latest    580c0e4e98b0   2 months ago    79.1MB
centos                latest    300e315adb2f   5 months ago    209MB