-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. python中的星号*、**的意义

    我们都知道,定义一个函数,当传入的参数个数未知时就可以使用*来表示. 单引号*: def test(*args): if len(args) >= 4: print(arg[3]) test(1 ...

  2. UVA 11134 Fabled Rooks

    贪心+优先队列+问题分解 对x,y 分开处理 当 xl<cnt(当前处理行)时,不能简单的选择cnt,而是应该让xl=cnt 并重新加入优先队列.(y的处理同上) #include <io ...

  3. SQL Server 备份的 8 种方法。

    方法 1. 完整备份 方法 2. 差异备份 方法 3. 部分备份(备份数据库的read_write部分) 方法 4. 文件备份 方法 5. 文件组备份 方法 6. 只复制备份 方法 7. 日志备份 - ...

  4. Oracle EBS-SQL (PO-17):检查供货比例不为100%.sql

    select           * from           apps.MRP_SOURCING_RULES msrwhere           organization_id=X.    a ...

  5. C语言的本质(21)——预处理之三:其它预处理特性及总结

    C标准规定了几个特殊的宏,在不同的地方使用可以自动展开成不同的值,预编译程序对于在源程序中出现的这些串将用合适的值进行替换.这些宏有下面这些: __FILE__ 展开为当前源文件的文件名,是一个字符串 ...

  6. 【思考题】CSDN第四届在线编程大赛2014初赛:带通配符的数

    题目要求: 输入参数:参数A,含有任意个数的?的数值字符串,如:12?4,?代表一位任意数                     参数B,不含?的数值字符串,长度与参数A一致 输出结果:参数A比参数 ...

  7. linux之SQL语句简明教程---UNION

    UNION 指令的目的是将两个 SQL 语句的结果合并起来.从这个角度来看, UNION 跟 JOIN有些许类似,因为这两个指令都可以由多个表格中撷取资料. UNION 的一个限制是两个 SQL 语句 ...

  8. 【FSFA 读书笔记】Ch 2 Computer Foundatinons(2)

    Hard Disk Technology 1. 机械硬盘内部构造 几个重要概念:Sector(扇区),Head(读写头),Track(磁道),Cylinder(柱面). 如果一个文件比较大,磁盘的写入 ...

  9. ps 导出png-8图片会变模糊

    出现这种情况的时候,在保存png-8图片的时候,索引色需要改为256,否则保存的图片颜色与原图会不一致.

  10. Seek the Name, Seek the Fame(Kmp)

    Seek the Name, Seek the Fame Time Limit : 4000/2000ms (Java/Other)   Memory Limit : 131072/65536K (J ...