Install the docker application in one minute
I. explanation
Docker requires the kernel version of the CentOS system to be higher than 3.10, so the centos7 operating system is used here.
Second, installation steps
1. Install vim and wget
Yum install-y wget vim
2. Install yum-utils, device-mapper-persistent-data, lvm2
Yum install-y yum-utils device-mapper-persistent-data lvm2,
3. Add yum source configuration
Yum-config-manager-- add-repo https://download.docker.com/linux/centos/docker-ce.repo
4. Install the latest docker
Yum install docker-ce-y
You can also list the available docker version numbers
Yum list docker-ce-- showduplicates | sort-r
For example, use yum install-y docker-ce-17.3.1 to install the specified version
5. Start docker and set self-boot.
Systemctl start docker
Systemctl enable docker
3. Uninstall docker
Yum remove docke-ce
Rm-rf / var/lib/docker