Docker保存鏡像
tag 鏡像
# 鏡像打 tag 標(biāo)簽
# docker tag 鏡像id/名 新名字
docker tag fce91102e17d tomcat01
commit 鏡像
注意這里是使用
容器id
, 版本號(hào)可加可不加文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-529608.html
docker commit 提交容器成為一個(gè)新的鏡像
# 容器生成新鏡像
# 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 保存(導(dǎo)出)鏡像
# 把鏡像打包成 .tar
# -o 要保存路徑.tar
# > 要保存路徑.tar
# docker save 鏡像id > /存儲(chǔ)路徑/xxx.tar
docker save fce91102e17d>/root/tomcat.tar
# docker save 鏡像id -o 存儲(chǔ)路徑
docker save fce91102e17d -o /root/tomcat.tar
官方文檔:https://docs.docker.com/engine/reference/commandline/save/文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-529608.html
到了這里,關(guān)于docker save 保存導(dǎo)出鏡像的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!