导出命令:

docker save -o <保存路径> <镜像名称:标签>

docker save -o ./test.tar test:latest

导入命令:

docker load --input <镜像压缩包>

docker load --input ./test.tar

查看docker镜像:

docker image | grep test:latest

 

二、docker容器导入导出命令

注意:docker容器导出之前需要先将容器停止

停止容器命令:docker stop <容器名>

导出命令:

docker export <容器名> > <保存路径>

docker export test:latest > ./test.tar

导入命令:

docker import <文件路径>  <容器名>

docker import ./test.tar test:latest

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-30
  • 2021-06-28
  • 2021-09-13
  • 2021-04-18
  • 2021-10-15
  • 2021-09-19
猜你喜欢
  • 2022-12-23
  • 2022-03-03
  • 2021-06-09
  • 2021-10-21
  • 2021-07-01
  • 2021-07-18
  • 2022-12-23
相关资源
相似解决方案