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 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导入本地镜像的更多相关文章
- Docker公共&本地镜像仓库(七)--技术流ken
分发镜像 我们已经会构建自己的镜像了,那么如果在多个docker主机上使用镜像那?有如下的几种可用的方法: 用相同的Dockerfile在其他host上构建镜像 将镜像上传到公共registry(比如 ...
- Docker公共&本地镜像仓库(七)
分发镜像 我们已经会构建自己的镜像了,那么如果在多个docker主机上使用镜像那?有如下的几种可用的方法: 用相同的Dockerfile在其他host上构建镜像 将镜像上传到公共registry(比如 ...
- docker 创建本地镜像服务器
1.docker pull registry //下载registry 镜像,registry 为docker 官方提供的一个镜像, 我们可以用它来创建本地的docker私有仓库. docker:/r ...
- docker 导入导出镜像
docker容器导入导出有两种方法: 一种是使用save和load命令 使用例子如下: docker save ubuntu:load>/root/ubuntu.tar docker load& ...
- Docker配置本地镜像与容器的存储位置
默认情况下Docker的存放位置为:/var/lib/docker 可以通过下面命令查看具体位置: sudo docker info | grep "Docker Root Dir" ...
- docker导入导出镜像
docker容器导入导出有两种方法: 一种是使用save和load命令 使用例子如下: docker save ubuntu:load>/root/ubuntu.tar docker load& ...
- docker 制作本地镜像
docker commit 55ddf8d62688 py_wb # 容器ID, 容器名称tag py_wb IP地址:5000/my-web:20180511 # 远程registory地址 我的镜 ...
- docker hub 本地镜像登录
docker的登录信息存放在home目录下的.docker文件夹下,查看 cat ~/.docker/config.json { "auths": { "gcyimgs. ...
- Docker修改本地镜像与容器的存储位置
这个方法里将通过软连接来实现. 首先停掉Docker服务: systemctl restart docker或者service docker stop 然后移动整个/var/lib/docker目录到 ...
随机推荐
- NGINX+PHP+MYSQL服务器环境搭建
这条命令是配置vim的,请确保你能访问github wget -qO- https://raw.github.com/ma6174/vim/master/setup.sh | sh 说明有一些小问题, ...
- Python之路第十一天,高级(3)-Python操作 Memcached、Redis
Memcached Memcached 是一个高性能的分布式内存对象缓存系统,用于动态Web应用以减轻数据库负载.它通过在内存中缓存数据和对象来减少读取数据库的次数,从而提高动态.数据库驱动网站的速度 ...
- 一个简化的printf函数
<C和指针>第7章第5道编程题: 实现一个简化的printf函数,它能够处理%d.%f.%s 和 %c 格式码,根据ANSI标准的原则,其他格式码的行为是未定义的.你可以假定已经存在函数 ...
- MySQL与unix时间问题
1.select unix_timestamp() -->可以返回以秒记的unix时间. 2.select from_unixtime('1455804595','%Y年%m月%d号'); -- ...
- Ubuntu 12.04安装NFS server
首先安装nfs-kernel-server apt-get install nfs-kernel-server 然后创建一个目录: mkdir -p /opt/share 并赋予权限777: chmo ...
- POSIX和SYSTEM的消息队列应该注意的问题
首先看看POSIX的代码: 1.posix_mq_server.c #include <mqueue.h>#include <sys/stat.h>#include <s ...
- pycares cffi
pypy 5.0.1 由于 cpyext 有 bug,用不了异步 DNS 解析库 pycares .花了一周时间,对照着 pycares 的 C 代码自己重写了个 cffi 的实现.在 windows ...
- sed简单实例练习
sedfile内容如下: Steve Blenheim:238-923-7366:95 Latham Lane, Easton, PA 83755:11/12/56:20300 Betty Boop: ...
- POJ3307+找规律
/* 题意:求第N个productivity property数是谁. (productivity property数:就是这个数可以由另外的数的各个位上的乘积得到.) */ #include< ...
- Python学习入门基础教程(learning Python)--8.1 字典数据添加与删除
1. 字典数据添加 这个很简单,像赋值那样一项项赋值即可.语法结构如下 dict_obj[key] = value 添加数据项示例如下 >>> d1 = {'cod ...