CentOS7 Linux install the specified version Docker
Docker's official website installation Address: https://docs.docker.com/install/linux/docker-ce/centos/
Environment Description
CentOS 7(Minimal Install)
$ cat /etc/redhat-release CentOS Linux release 7.6.1810 (Core)
Uninstall the old version Docker
[root@vm-CentOS750210 ~]# systemctl stop docker [root@vm-CentOS750210 ~]# yum remove docker -y
In the old version of the content /var/lib/docker
, the image directory (Images), containers (Containers), storage volumes (Volumes), and network configuration (Networks) can be retained.
Installation Docker-ce
Installation Preparation - Configure docker yum source
[root@vm-CentOS750210 ~]# yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
Install the specified version docker-ce, slower process, be patient
sudo yum update
sudo yum install -y yum-utils
sudo yum install docker-ce
# View installable version
[root @ vm-CentOS750210 ~] # yum list docker-ce --showduplicates | sort -r
# Specified version Installation
yum install docker-ce- <VERSION STRING >
After successful installation start docker and set boot
[root@vm-CentOS750210 ~]# systemctl start docker [root@vm-CentOS750210 ~]# systemctl enable docker Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.
Verifying the Installation
[root@vm-CentOS750210 ~]# docker run hello-world
So far, the mounting portion is completed.