docker save image

Docker save image


tag mirror

# 镜像打 tag 标签
# docker tag 镜像id/名 新名字
docker tag fce91102e17d tomcat01

commit mirror

Note that this is used 容器id, the version number can be added or not

docker commit 提交容器成为一个新的镜像

# 容器生成新镜像
# docker commit -m="提交描述信息" -a="作者" 容器id 自己起镜像名:版本
docker commit -m="新增app" -a="test" fce91102e17d tomcat:1.0
# docker commit -m="提交描述信息" -a="作者" 容器id 自己起镜像名
docker commit -m="新增app" -a="test" fce91102e17d tomcat

save Save (export) the image

# 把镜像打包成 .tar
# -o 要保存路径.tar
# >  要保存路径.tar
# docker save 镜像id > /存储路径/xxx.tar
docker save fce91102e17d>/root/tomcat.tar

# docker save 镜像id -o 存储路径
docker save fce91102e17d -o /root/tomcat.tar

Official document: https://docs.docker.com/engine/reference/commandline/save/

Guess you like

Origin blog.csdn.net/weixin_44953227/article/details/108755418