Install Docker 1.12.3 and centosdocker in CentOS 7.2
From http://www.cnblogs.com/scoter2008
1. Powerful official documentation
https://docs.docker.com/engine/installation/linux/centos/
2. Follow the steps to update the yum source first. Here the 163 source is used.
Yum install-y wgetcd/etc/yum. repos. dwget http://mirrors.163.com/.help/CentOS7-Base-163.repo/usr/bin/yum clean all/usr/bin/yum makecache the source that comes with other systems can be retained or killed
3. Update the system
yum update
4. If any problem occurs: Delta RPMs disabled because/usr/bin/applydeltarpm not installed.
yum install -y deltarpm
5. Edit the yum source file of docker.
tee /etc/yum.repos.d/docker.repo <<-'EOF'[dockerrepo]name=Docker Repositorybaseurl=https://yum.dockerproject.org/repo/main/centos/7/enabled=1gpgcheck=1gpgkey=https://yum.dockerproject.org/gpgEOF
6. Install Docker
yum install docker-engine
7. If any problem occurs:Public key for docker-engine-selinux-1.10.1-1.el7.centos.noarch.rpm is not installed, execute the following command
rpm --import https://yum.dockerproject.org/gpg
8. Docker download is slow. Please wait.
9. After the installation is complete, set the Automatic startup
systemctl enable docker.service
10. Start the docker daemon
systemctl start docker
11. Check the docker version.
[root@localhost ~]# docker versionClient: Version: 1.12.3 API version: 1.24 Go version: go1.6.3 Git commit: 6b644ec Built: OS/Arch: linux/amd64Server: Version: 1.12.3 API version: 1.24 Go version: go1.6.3 Git commit: 6b644ec Built: OS/Arch: linux/amd64
12. Done, enjoy it!