镜像的导出和导入 (offline)

  1. PS C:\Users\Peng Xiao\docker.tips\image> docker image ls
  2. nginx 1.20.0 7ab27dbbfbdf 12 days ago 133MB
  3. nginx latest f0b8a9a54136 12 days ago 133MB
  4. PS C:\Users\Peng Xiao\docker.tips\image> docker image save nginx:1.20.0 -o nginx.image
  5. PS C:\Users\Peng Xiao\docker.tips\image> ls
  6. Directory: C:\Users\Peng Xiao\docker.tips\image
  7. Mode LastWriteTime Length Name
  8. ---- ------------- ------ ----
  9. -a---- 5/24/2021 1:40 PM 137379328 nginx.image
  10. PS C:\Users\Peng Xiao\docker.tips\image> docker image rm 7ab
  11. Untagged: nginx:1.20.0
  12. Deleted: sha256:7ab27dbbfbdf4031f0603a4b597cc43031ff883b54f9329f0309c80952dda6f5
  13. Deleted: sha256:5b2a9404d052ae4205f6139190fd4b0921ddeff17bf2aaf4ee97f79e1a8242fe
  14. Deleted: sha256:03ebf76f0cbf5fd32ca010bb589c2139ce7e44c050fe3de2d77addf4cfd25866
  15. Deleted: sha256:0191669d087dce47072254a93fe55cbedd687f27d3798e2260f846e8f8f5729a
  16. Deleted: sha256:17651c6a0ba04d31da14ac6a86d8fb3f600883f9e155558e8aad0b94aa6540a2
  17. Deleted: sha256:5a673ff4c07a1b606f2ad1fc53697c99c45b0675734ca945e3bb2bd80f43feb8
  18. PS C:\Users\Peng Xiao\docker.tips\image> docker image ls
  19. REPOSITORY TAG IMAGE ID CREATED SIZE
  20. nginx latest f0b8a9a54136 12 days ago 133MB
  21. PS C:\Users\Peng Xiao\docker.tips\image> docker image load -i .\nginx.image
  22. 1839f9962bd8: Loading layer [==================================================>] 64.8MB/64.8MB
  23. a2f4f809e04e: Loading layer [==================================================>] 3.072kB/3.072kB
  24. 9b63e6289fbe: Loading layer [==================================================>] 4.096kB/4.096kB
  25. f7141923aaa3: Loading layer [==================================================>] 3.584kB/3.584kB
  26. 272bc57d3405: Loading layer [==================================================>] 7.168kB/7.168kB
  27. Loaded image: nginx:1.20.0
  28. PS C:\Users\Peng Xiao\docker.tips\image> docker image ls
  29. REPOSITORY TAG IMAGE ID CREATED SIZE
  30. nginx 1.20.0 7ab27dbbfbdf 12 days ago 133MB
  31. nginx latest f0b8a9a54136 12 days ago 133MB
  32. PS C:\Users\Peng Xiao\docker.tips\image>