美文网首页
打包docker镜像并使用文件导入

打包docker镜像并使用文件导入

作者: 猪丶八戒 | 来源:发表于2018-08-16 16:58 被阅读0次

将在线下载或者自己编译的Docker镜像打成tar包,以备在没有网络的情况下,在其他服务器直接导入docker镜像。
1.查看当前镜像

[root@localhost docker-images]#  docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
nginx               latest              c82521676580        3 weeks ago         109 MB

2.打包当前镜像

[root@localhost yum]# docker save -o images.tar postgres:9.6 mongo:3.4

3.将打包镜像导入目标服务器,并使用docker导入

[root@localhost yum]# docker load -i images.tar

相关文章

网友评论

      本文标题:打包docker镜像并使用文件导入

      本文链接:https://www.haomeiwen.com/subject/jntobftx.html