docker导入本地镜像

               
-rw-r--r--  1 root root 98954220 Mar 17 17:02 centos-6-x86.tar.gz利用下载的包 创建镜像:cat centos-6-x86.tar.gz | docker import - centos-6-x86-64(名字自己定义)把一个现有的镜像,导出成文件:docker save -o centos_with_net.tar  IMAGE ID:docker:/root# docker  imagesREPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZEcentos_6.5_net      scan                9e2de3fc0748        About an hour ago   398.6 MBcentos_with_net     scan                92b2e7f857ae        2 hours ago         269.5 MBjanuswel/centos     latest              088820de4929        12 days ago         198.3 MBlinux123            jj                  088820de4929        12 days ago         198.3 MBlinux123            latest              088820de4929        12 days ago         198.3 MBlinux123            xxx123              088820de4929        12 days ago         198.3 MBcentos              latest              bb3d629a7cbc        12 days ago         196.6 MBblalor/centos       latest              f01c1b138488        21 months ago       322.4 MBdocker:/root# docker save -o centos_with_net.tar 92b2e7f857aedocker:/root# ls -ltrtotal 377296-rw-r--r--. 1 root root      7572 Jan 15  2015 install.log.syslog-rw-r--r--. 1 root root     27312 Jan 15  2015 install.log-rw-------. 1 root root      1342 Jan 15  2015 anaconda-ks.cfg-rw-r--r--  1 root root 277186048 Mar 17 17:07 centos_with_net.tar-rw-r--r--  1 root root 109115444 Mar 17 17:07 centos-6-x86.tar.gz导入镜像:docker load <centos_with_net.tardocker:/root# docker rmi 92b2e7f857aeError response from daemon: Conflict, cannot delete 92b2e7f857ae because the running container cf141517fd59 is using it, stop it and use -f to forceError: failed to remove images: [92b2e7f857ae]docker 停止容器:docker:/root# docker load <centos_with_net.tardocker:/root# docker imagesREPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZEcentos_6.5_net      scan                9e2de3fc0748        About an hour ago   398.6 MB<none>              <none>              92b2e7f857ae        2 hours ago         269.5 MBjanuswel/centos     latest              088820de4929        12 days ago         198.3 MBlinux123            jj                  088820de4929        12 days ago         198.3 MBlinux123            latest              088820de4929        12 days ago         198.3 MBlinux123            xxx123              088820de4929        12 days ago         198.3 MBcentos              latest              bb3d629a7cbc        12 days ago         196.6 MBblalor/centos       latest              f01c1b138488        21 months ago       322.4 MB倒回之后没有名字:docker:/root# docker tag 92b2e7f857ae centos_with_net:czcbdocker:/root# docker imagesREPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZEcentos_6.5_net      scan                9e2de3fc0748        About an hour ago   398.6 MBcentos_with_net     czcb                92b2e7f857ae        2 hours ago         269.5 MBlinux123            jj                  088820de4929        12 days ago         198.3 MBlinux123            latest              088820de4929        12 days ago         198.3 MBlinux123            xxx123              088820de4929        12 days ago         198.3 MBjanuswel/centos     latest              088820de4929        12 days ago         198.3 MBcentos              latest              bb3d629a7cbc        12 days ago         196.6 MBblalor/centos       latest              f01c1b138488        21 months ago       322.4 MB

           

再分享一下我老师大神的人工智能教程吧。零基础!通俗易懂!风趣幽默!还带黄段子!希望你也加入到我们人工智能的队伍中来!https://blog.csdn.net/jiangjunshow

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值