2018-09-26 docker load -i gd_saved_images.tar 导入docker镜像而不是docker import

[root@gdswarm1 ~]# 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
--help Print usage
-m, --message string Set commit message for imported image


使用上述命令import了一个tar文件(包含3个docker镜像),结果确实是多了一个文件层,就是没有镜像!

所以最后用的是 docker load -i gd_saved_images.tar
这样三个docker镜像才正确地载入了。


docker load --help

Usage:  docker load [OPTIONS]

Load an image from a tar archive or STDIN

Options:
      --help           Print usage
  -i, --input string   Read from tar archive file, instead of STDIN
  -q, --quiet          Suppress the load output
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 一、Docker 简介 Docker 两个主要部件:Docker: 开源的容器虚拟化平台Docker Hub: 用...
    R_X阅读 9,847评论 0 27
  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi阅读 12,164评论 0 10
  • 转自:https://www.cnblogs.com/ivictor/archive/2015/09/08/479...
    Juggle阅读 3,030评论 0 0
  • # docker --helpUsage: docker [OPTIONS] COMMAND [arg...] ...
    dujh302阅读 3,003评论 0 0
  • 我怎么如此幸运我们常说能量是一种传递,是一种把能量传递给别人,在不知道能量到了谁身上之后的某一天又回到自己身上。就...
    Wan9sha阅读 2,817评论 0 0