1、docker导出镜像到文件:

  docker save [OPTIONS] IMAGE [IMAGE...]


  例如:
    docker save -o mysql-8.tar mysql:8.0

 

2、docker导入文件到镜像:
  docker load [OPTIONS]


  例如:
    docker load -i mysql-8.tar

 

3、docker导出容器到文件:
  docker export [OPTIONS] CONTAINER
  

  例如:
    docker export -o mysql-8.tar mysql-demo

 

4、docker导入容器生成的文件到镜像:
  docker import [OPTIONS] file|URL|- [REPOSITORY[:TAG]]

  例如:
    docker import mysql-8.tar mysql:8.0

相关文章:

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