导出
首先使用docker images命令查看当前系统的镜像
export命令是从容器(container)中导出tar文件,而save命令则是从镜像(images)中导出
SAVE:
docker save -o pod-infrastructure.tar pod-infrastructure:latest
export:
docker export -o pod-infrastructure.tar pod-infrastructure
将tar镜像包scp到目标主机上
LOAD命令:
举例:docker load -i pod-infrastructure.tar
镜像导入后,因为没有指定tag,可以使用docker tag 镜像id 镜像名:tag 来给镜像打上标签。