1 installing Docker on CentOS 6.4
Docker currently only supports Ubuntu, so installing Docker in CentOS is a hassle (Issue #172).
The official Docker document says Linux kernel is required to be at least 3.8 and CentOS 6.4 is the 2.6 kernel, so I whined whined to install the latest kernel 3.11.6, reboot and run Docker or fail, and finally find the reason is because the compile-time forgot to integrate the Aufs module. Aufs need to compile with kernel, very troublesome.
But no need to be so troublesome, a strongman has compiled the kernel with AUFS module, see here Installing Docker.io on CentOS 6.4 (64-bit)
1.1 Cancel SELinux because it interferes with the normal function of the LXC
sudo vim/etc/selinux/config
Selinux=disabled
selinuxtype=targeted
1.2 Installing Fedora EPEL
sudo yum install http://ftp.riken.jp/Linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
1.3 Add HOP5 Repo address
Cd/etc/yum.repos.d
sudo wget Http://www.hop5.in/yum/el6/hop5.repo
1.4 Installing Docker-io
sudo yum install Docker-io
The 3.10 cores with the Aufs module are automatically installed, as well as the Docker-io package.
1.5 Add the Cgroup file system to/etc/fstab so that Docker works
sudo echo "None/sys/fs/cgroup cgroup defaults 0 0" >>/etc/fstab
1.6 Modifying the Grub boot order
sudo vim/etc/grub.conf
Default=0
Set default to the location of the newly installed kernel, typically 0
1.7 Restart
sudo reboot
1.8 Check if the new kernel is booted successfully
After rebooting, check to see if the new kernel is booting up.
Uname-r
3.10.5-3.el6.x86_64
That means it worked.
See if AUFS exists.
grep aufs/proc/filesystems
Nodev Aufs
Description exists
1.9 Starting the Docker daemon process
sudo docker-d &
If you are in the company and the company is online through a proxy, you can tell Docker the proxy server, using the following command (see here):
sudo http_proxy=http://xxx:port docker-d &
1.10 Download Ubuntu image
sudo docker pull Ubuntu
1.11 Running Hello World
sudo docker run Ubuntu/bin/echo Hello World
Hello World
The installation is successful!!
Linux under Docker installation