-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  images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
centos_6.5_net scan 9e2de3fc0748 About an hour ago 398.6 MB
centos_with_net scan 92b2e7f857ae 2 hours ago 269.5 MB
januswel/centos latest 088820de4929 12 days ago 198.3 MB
linux123 jj 088820de4929 12 days ago 198.3 MB
linux123 latest 088820de4929 12 days ago 198.3 MB
linux123 xxx123 088820de4929 12 days ago 198.3 MB
centos latest bb3d629a7cbc 12 days ago 196.6 MB
blalor/centos latest f01c1b138488 21 months ago 322.4 MB
docker:/root# docker save -o centos_with_net.tar 92b2e7f857ae
docker:/root# ls -ltr
total 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.tar docker:/root# docker rmi 92b2e7f857ae
Error response from daemon: Conflict, cannot delete 92b2e7f857ae because the running container cf141517fd59 is using it, stop it and use -f to force
Error: failed to remove images: [92b2e7f857ae] docker 停止容器: docker:/root# docker load <centos_with_net.tar
docker:/root# docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
centos_6.5_net scan 9e2de3fc0748 About an hour ago 398.6 MB
<none> <none> 92b2e7f857ae 2 hours ago 269.5 MB
januswel/centos latest 088820de4929 12 days ago 198.3 MB
linux123 jj 088820de4929 12 days ago 198.3 MB
linux123 latest 088820de4929 12 days ago 198.3 MB
linux123 xxx123 088820de4929 12 days ago 198.3 MB
centos latest bb3d629a7cbc 12 days ago 196.6 MB
blalor/centos latest f01c1b138488 21 months ago 322.4 MB 倒回之后没有名字: docker:/root# docker tag 92b2e7f857ae centos_with_net:czcb
docker:/root# docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
centos_6.5_net scan 9e2de3fc0748 About an hour ago 398.6 MB
centos_with_net czcb 92b2e7f857ae 2 hours ago 269.5 MB
linux123 jj 088820de4929 12 days ago 198.3 MB
linux123 latest 088820de4929 12 days ago 198.3 MB
linux123 xxx123 088820de4929 12 days ago 198.3 MB
januswel/centos latest 088820de4929 12 days ago 198.3 MB
centos latest bb3d629a7cbc 12 days ago 196.6 MB
blalor/centos latest f01c1b138488 21 months ago 322.4 MB

docker导入本地镜像的更多相关文章

  1. Docker公共&本地镜像仓库(七)--技术流ken

    分发镜像 我们已经会构建自己的镜像了,那么如果在多个docker主机上使用镜像那?有如下的几种可用的方法: 用相同的Dockerfile在其他host上构建镜像 将镜像上传到公共registry(比如 ...

  2. Docker公共&本地镜像仓库(七)

    分发镜像 我们已经会构建自己的镜像了,那么如果在多个docker主机上使用镜像那?有如下的几种可用的方法: 用相同的Dockerfile在其他host上构建镜像 将镜像上传到公共registry(比如 ...

  3. docker 创建本地镜像服务器

    1.docker pull registry //下载registry 镜像,registry 为docker 官方提供的一个镜像, 我们可以用它来创建本地的docker私有仓库. docker:/r ...

  4. docker 导入导出镜像

    docker容器导入导出有两种方法: 一种是使用save和load命令 使用例子如下: docker save ubuntu:load>/root/ubuntu.tar docker load& ...

  5. Docker配置本地镜像与容器的存储位置

    默认情况下Docker的存放位置为:/var/lib/docker 可以通过下面命令查看具体位置: sudo docker info | grep "Docker Root Dir" ...

  6. docker导入导出镜像

    docker容器导入导出有两种方法: 一种是使用save和load命令 使用例子如下: docker save ubuntu:load>/root/ubuntu.tar docker load& ...

  7. docker 制作本地镜像

    docker commit 55ddf8d62688 py_wb # 容器ID, 容器名称tag py_wb IP地址:5000/my-web:20180511 # 远程registory地址 我的镜 ...

  8. docker hub 本地镜像登录

    docker的登录信息存放在home目录下的.docker文件夹下,查看 cat ~/.docker/config.json { "auths": { "gcyimgs. ...

  9. Docker修改本地镜像与容器的存储位置

    这个方法里将通过软连接来实现. 首先停掉Docker服务: systemctl restart docker或者service docker stop 然后移动整个/var/lib/docker目录到 ...

随机推荐

  1. [汇编语言]-第七章 用[bx+idata]的方式进行数组的处理

    1- 转化为大写 方法一: assume cs:code,ds:data data segment db 'BaSiC' db 'MinIX' data ends code segment start ...

  2. lol.py

    #!/usr/bin/env python # -*- coding: utf-8 -*- import os from twisted.application import service from ...

  3. A+B II

    Problem Description I have a very simple problem for you. Given two integers A and B, your job is to ...

  4. Git学习01 --git add, git commit , git log ,git status, git reset --hard, head

    Git官方提供的快速入门教程:https://try.github.io/levels/1/challenges/1 特点:Git极其强大的分支管理:分布式版本 集中式版本控制系统,版本库是集中存放在 ...

  5. DIV周边添加投影及背景固定

    DIV周边添加投影.tou{ width:1000px; height:300px; border:0px solid #999; background:#FFF; margin:0 auto; ma ...

  6. Matlab与.NET混编解决人脸识别问题

    原文 http://www.cnblogs.com/asxinyu/archive/2013/05/29/3107013.html 如果这些文章对你有用,有帮助,期待更多开源组件介绍,请不要吝啬手中的 ...

  7. inno setup 跳过(Welcome)欢迎界面

    原文 http://zwkufo.blog.163.com/blog/static/25882512010816049549/ 在InnoSetup中,我们很容易用 function ShouldSk ...

  8. __declspec,__cdecl,__stdcall都是什么意思?有什么作用?

    __cdecl和__stdcall都是函数调用规范(还有一个__fastcall),规定了参数出入栈的顺序和方法,如果只用VC编程的话可以不用关心,但是要在C++和Pascal等其他语言通信的时候就要 ...

  9. c++优先级

    蒟蒻连c++的运算优先级都搞不清楚QAQ 转载自http://www.cnblogs.com/chenglei/archive/2009/08/03/1537822.html C++优先级列表 Pre ...

  10. A Knight's Journey 分类: dfs 2015-05-03 14:51 23人阅读 评论(0) 收藏

    A Knight’s Journey Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 34085 Accepted: 11621 ...