1. install dockerdocker on CentOS6.5. Currently, only Ubuntu is supported officially, so it is troublesome to install Docker on CentOS (Issue #172 ). Docker official documentation said that at least 3.8 of Linuxkernel is required, and CentOS6.4 is the kernel of 2.6. so I have compiled and installed the latest kernel3.11.6, and then restarted the system to run the dock.
1. install docker on CentOS 6.5
Docker currently only supports Ubuntu, so it is troublesome to install Docker on CentOS (Issue #172 ).
According to the official docker Documentation, at least 3.8 of Linux kernel is required, and CentOS6.4 is the 2.6 kernel. so I compiled and installed the latest kernel3.11.6. after the restart, I still failed to run docker. Finally, I found the cause, it is because you forgot to integrate the aufs module during compilation. Aufs needs to be compiled with kernel, which is very troublesome.
But it doesn't need to be so troublesome. some strong people have compiled the kernel with the aufs module. for details, see Installing docker. io on.Centos6.4 (64-bit)
1.1 cancel selinux because it will interfere with the normal functions of lxc
Sudo vim/etc/selinux/config
SELINUX = disabled
SELINUXTYPE = targeted
1.2 install Fedora EPEL
Sudo yum install http://ftp.riken.jp/Linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
1.3 add the hop5 repo address
Cd/etc/yum. repos. d
Sudo wget http://www.hop5.in/yum/el6/hop5.repo
1.4 install docker-io
Sudo yum install docker-io
The 3.10 kernel with the aufs module and the docker-io package are automatically installed.
1.5 add the cgroup file system to/etc/fstab. Only in this way can docker work normally.
Sudo echo "none/sys/fs/cgroup defaults 0 0">/etc/fstab
1.6 modify the grub boot sequence
Sudo vim/etc/grub. conf
Default = 0
Set default to the location of the newly installed kernel, usually 0
1.7 restart
Sudo reboot
1.8 check whether the new kernel boot is successful
After the restart, check whether the new kernel is booted.
Uname-r
3.10.5-3. el6.x86 _ 64
It indicates the operation is successful.
Check whether aufs exists.
Grep aufs/proc/filesystems
Nodev aufs
Description already exists
1.9 start the docker daemon process
Sudo docker-d &
If you are in the company and the company accesses the Internet through proxy, you can tell the proxy server to docker and use the following command (refer to here ):
Sudo HTTP_PROXY = http: // xxx: port docker-d &
1.10 download ubuntu image
Sudo docker pull ubuntu
1.11 run hello world
Sudo docker run ubuntu/bin/echo hello world
Hello world
Installation successful !!