docker save命令-打包image

save 将image打包保存

Usage: docker save IMAGE


Save an image to a tar archive (streamed to STDOUT bydefault)-o,--output=""Write to an file, instead of STDOUT

Produces a tarred repository to the standard output stream. Contains all parent layers, and all tags + versions, or specified repo:tag.

打包的可以使用 docker load

$ sudo docker save busybox > busybox.tar

$ ls
-sh busybox.tar
2.7M busybox.tar
$ sudo docker save
--output busybox.tar busybox
$ ls
-sh busybox.tar
2.7M busybox.tar
$ sudo docker save
-o fedora-all.tar fedora
$ sudo docker save
-o fedora-latest.tar fedora:latest