Ubuntu Series installs Docker through the system comes with package installation
The Ubuntu 14.04 version of the system has its own Docker package, which can be installed directly.
$ sudo apt-get update$ sudo apt-get install -y docker.io$ sudo ln -sf /usr/bin/docker.io /usr/local/bin/docker$ sudo sed -i ‘$acomplete -F _docker docker‘ /etc/bash_completion.d/docker.io
If you install Docker using the operating system's own package, the currently installed version is the older 0.9.1. To install the updated version, you can do this by using the Docker source.
Install the latest version from the Docker source
To install the latest Docker version, you first need to install APT-TRANSPORT-HTTPS support and then install it by adding a source.
$ sudo apt-get install apt-transport-https$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9$ sudo bash -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"$ sudo apt-get update$ sudo apt-get install lxc-docker
14.04 Previous Versions
If you have an older Ubuntu system, you need to update the kernel first.
$ sudo apt-get update$ sudo apt-get install linux-image-generic-lts-raring linux-headers-generic-lts-raring$ sudo reboot
Then repeat the above steps.
Start the Docker service after installation.
$ sudo service docker start
CentOS Series Installation Docker
Docker supports CentOS6 and later versions.
CentOS6
For CentOS6, you can use the EPEL library to install Docker with the following command
$ sudo yum install http://mirrors.yun-idc.com/epel/6/i386/epel-release-6-8.noarch.rpm$ sudo yum install docker-io
CentOS7
CentOS-Extras
Docker is already in the CENTOS7 system library and can be installed directly:
$ sudo yum install docker
Start the Docker service after installation and let it load automatically with the system boot.
$ sudo service docker start$ sudo chkconfig docker on
Docker installation for the first time in life