Install the detailed tutorial for Docker1.12 in Centos7

  • 2020-06-07 05:42:26
  • OfStack

In Centos7, Docker is version 1.9 if installed directly using yum install Docker.

Many new features have been added in the 1.12 release, such as improved network and swarm. This article will show you how to install the 1.12 Docker service in the Centos7 operating system.

Install the wget tool


yum install -y wget

Note: To download the yum source, you need to install the wget download tool first.

Update yum source


cd /etc/yum.repos.d
wget http://mirrors.163.com/.help/CentOS7-Base-163.repo

Note: the first to enter/etc/yum repos. d this directory, download again 163 Centos7 yum source, thus directly downloaded to the/etc/yum repos. d this directory.

Update the system


yum clean all
yum makecache
yum update -y

Note: This process may take longer.

yum source file to generate 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

Explanation: this step can refer to the official document: https: / / docs docker. com/engine/installation/linux/centos /

Install Docker


yum install -y docker-engine

Note: this is ES68en-ES69en not docker.

Set to boot up


systemctl enable docker

Start the Docker service


systemctl start docker

Check the version


[root@centos-101 yum.repos.d]# docker version
Client:
 Version:   1.12.5
 API version: 1.24
 Go version:  go1.6.4
 Git commit:  7392c3b
 Built:    Fri Dec 16 02:23:59 2016
 OS/Arch:   linux/amd64

Server:
 Version:   1.12.5
 API version: 1.24
 Go version:  go1.6.4
 Git commit:  7392c3b
 Built:    Fri Dec 16 02:23:59 2016
 OS/Arch:   linux/amd64

Note: Commands to view Docker version:


docker version

The installation method is relatively simple. The main order is to update the operating system before installing the Docker service.


Related articles: