共计 2458 个字符,预计需要花费 7 分钟才能阅读完成。
CentOS 6.5 制作 Debian 7 Wheezy 的 Docker 镜像过程笔记。
具体步骤就不详述了,跟前面的文章一样:
后面是终端执行命令的步骤,按步骤来就可以了
[root@localhost admin]# debootstrap –arch amd64 wheezy debian-wheezy http://mirrors.163.com/debian/
E: No such script: /usr/share/debootstrap/scripts/wheezy
[root @localhost admin]# ln -s /usr/share/debootstrap/scripts/sid /usr/share/debootstrap/scripts/wheezy
[root @localhost admin]# debootstrap –arch amd64 wheezy debian-wheezy http://mirrors.163.com/debian/
这里需要等待很久
[root @localhost admin]# chown -R admin.admin debian-wheezy/
su admin
[admin @localhost ~]$ cd debian-wheezy/
[admin @localhost debian-wheezy]$ tar -c .|docker import – debianwheezy-base
eb32a915f53f174e3ce5ef4490c23ef32d5ab4b80a90066b2426db7237d7699d
[admin @localhost debian-wheezy]$ docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
debianwheezy-base latest eb32a915f53f 28 seconds ago 216.8 MB
Ubuntu1204-base latest 43ad1b1116dd About an hour ago 172.7 MB
centos63-bash latest d2ecedd2b5ed 2 hours ago 306.7 MB
[admin @localhost debian-wheezy]$ docker run -t -i debianwheezy-base /bin/bash
root@linuxidc:/# cat /etc/issue
Debian GNU/Linux 7 \n \l
root@linuxidc:/# exit
exit
[admin @localhost debian-wheezy]$
[admin @localhost debian-wheezy]$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
linuxidc debianwheezy-base:latest /bin/bash About a minute ago Exited (0) 33 seconds ago elegant_perlman
8053e2ca797b ubuntu1204-base:latest /bin/bash About an hour ago Exited (0) About an hour ago thirsty_thompson
14c9afaf2f06 centos63-bash:latest /bin/bash 2 hours ago Exited (0) 2 hours ago insane_lalande
[admin @localhost debian-wheezy]$ docker start linuxidc
4e0223444ef6
[admin @localhost debian-wheezy]$ docker attach linuxidc
ls
bin dev home lib64 mnt proc run selinux sys usr
boot etc lib media opt root sbin srv tmp var
root@linuxidc:/# pwd
/
CentOS 6/ 7 系列安装 Docker http://www.linuxidc.com/Linux/2014-07/104768.htm
Docker 的搭建 Gitlab CI 全过程详解 http://www.linuxidc.com/Linux/2013-12/93537.htm
Docker 安装应用 (CentOS 6.5_x64) http://www.linuxidc.com/Linux/2014-07/104595.htm
Docker 和一个正常的虚拟机有何区别? http://www.linuxidc.com/Linux/2013-12/93740.htm
在 Docker 中使用 MySQL http://www.linuxidc.com/Linux/2014-01/95354.htm
Docker 将改变所有事情 http://www.linuxidc.com/Linux/2013-12/93998.htm
Docker 安装应用 (CentOS 6.5_x64) http://www.linuxidc.com/Linux/2014-07/104595.htm
Docker 的详细介绍 :请点这里
Docker 的下载地址 :请点这里
更多 CentOS 相关信息见 CentOS 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=14