Detailed method for installing version 1.12.3 of Docker under CentOS 7.2


Docker is an open source application container engine that allows developers to package their applications and dependencies into a portable container and release them to any popular Linux machine, as well as virtualization. Containers are completely sandboxed and have no interfaces with each other.

1. Powerful official documents

https://docs.docker.com/engine/installation/linux/centos/

2. Follow the steps to update the yum source, which is 163

yum install -y wget
cd /etc/yum.repos.d
wget http://mirrors.163.com/.help/CentOS7-Base-163.repo
/usr/bin/yum clean all
/usr/bin/yum makecache

Other systems can keep their own sources, or they can kill them all

3. Update the system

yum update

4. If there is a problem: Delta RPMs disabled because /usr/bin/applydeltarpm not installed.

yum install -y deltarpm

5. Edit and generate yum source files of docker

tee /etc/yum.repos.d/docker.repo <<-'EOF'
[dockerrepo]
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/main/centos/7/
enabled=1
gpgcheck=1
gpgkey=https://yum.dockerproject.org/gpg
EOF

6. Install Docker

yum install docker-engine

7, if you have problems: 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 speed is slow, please be patient

9. After the installation is completed, it is set to start up automatically

systemctl enable docker.service

10. Start the docker daemon

systemctl start docker

11. View the docker version

[root@localhost ~]# docker version

Client:

Version: 1.12.3 API version: 1.24 Go version: go1.6.3 Git commit: 6b644ec

Built:

OS/Arch: linux/amd64

Server:

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!