(九)docker容器之导入导出快照

网友投稿 300 2022-10-25

(九)docker容器之导入导出快照

镜像的导出和导入 #-o导出指定文件 docker save -o nginx.bak nginx #存储 docker load < nginx.bak #导入 容器的导出和导入 docker export -o nginx.tar nginx #导出快照 docker import nginx.tar #导入快照 区别:容器的快照信息将丢弃历史记录和元数据信息(只保留容器当时的快照状态),而镜像的存储文件将保存完整记录。 root@14:24:06~# docker export --help Usage: docker export [OPTIONS] CONTAINER Export a container's filesystem as a tar archive Options: -o, --output string Write to a file, instead of STDOUT root@14:25:12~# docker import --help Usage: docker import [OPTIONS] file|URL|- [REPOSITORY[:TAG]] Import the contents from a tarball to create a filesystem image Options: -c, --change list Apply Dockerfile instruction to the created image -m, --message string Set commit message for imported image ###################################################################### root@14:24:36~# docker save --help Usage: docker save [OPTIONS] IMAGE [IMAGE...] Save one or more images to a tar archive (streamed to STDOUT by default) Options: -o, --output string Write to a file, instead of STDOUT root@14:24:43~# docker load --help Usage: docker load [OPTIONS] Load an image from a tar archive or STDIN Options: -i, --input string Read from tar archive file, instead of STDIN -q, --quiet Suppress the load output

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:盘点当前主流显示器接口
下一篇:dvi接口是什么_以及其优点介绍
相关文章

 发表评论

暂时没有评论,来抢沙发吧~