首页 > 技术文章 > docker 离线images 镜像文件导入

gxhh-lzh 2020-10-15 10:33 原文

整体思路

在能上网的docker 机器上线下载 镜像 images ,然后保存此镜像,最后上传到 不能上网的docker机器上 load 为docker镜像 images。

下载镜像,导出为tar文件

比如:
[root@localhost ~]# docker save hello-world -o hello-world.tar

上传 tar文件

把上传的tar文件 load 为docker镜像

使用命令:docker load -i hello-world.tar 把上传的tar文件 load 为docker镜像

docker images 查看刚load的 镜像

推荐阅读