docker commit镜像
程序员文章站
2022-05-02 20:21:21
...
commit镜像
docker commit 提交容器成为一个新的镜像
#命令和git原理类似
docker commit -m="提交的描述信息" -a="作者" 容器ID 目标镜像名:[tag]
[[email protected] ~]# docker commit -a="estelleiris" -m="cp webapps.dist/* webapps" 4473d1235def myTomcat:1.0
invalid reference format: repository name must be lowercase
# 仓库名称必须是小写的
[[email protected] ~]# docker commit -a="estelleiris" -m="cp webapps.dist/* webapps" 4473d1235def mytomcat:1.0
sha256:a46f29ce3b2aeea7dcac267f5c241f9d30c85c146eae203a76ecf0eca9518f0b
[[email protected] ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
mytomcat 1.0 a46f29ce3b2a About a minute ago 654MB