Use CentOS 6.5 to create a Docker image for Debian 7 Wheezy
Docker Image Process notes for preparing Debian 7 Wheezy in CentOS 6.5.
The specific steps are not described in detail, as in the previous article:
The following is the procedure for the terminal to execute commands.
[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/
This takes a long time
[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
Bytes
[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 Mbit/s
Centos63-bash latest d2ecedd2b5ed 2 hours ago 306.7 MB
[Admin @ localhost debian-wheezy] $ docker run-t-I debianwheezy-base/bin/bash
Root @ bkjia:/# cat/etc/issue
Debian GNU/Linux 7 \ n \ l
Root @ bkjia:/# exit
Exit
[Admin @ localhost debian-wheezy] $
[Admin @ localhost debian-wheezy] $ docker ps-
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
Bkjia 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 bkjia
4e0223444ef6
[Admin @ localhost debian-wheezy] $ docker attach bkjia
Ls
Bin dev home lib64 mnt proc run selinux sys usr
Boot etc lib media opt root sbin srv tmp var
Root @ bkjia:/# pwd
/
Install Docker in CentOS 6/7 Series
Detailed explanation of the entire process of building Gitlab CI for Docker
Docker installation application (CentOS 6.5_x64)
What is the difference between Docker and a normal Virtual Machine?
Use MySQL in Docker
Docker will change everything
Docker installation application (CentOS 6.5_x64)
Docker details: click here
Docker: click here