- View Linux version
Docker does not support versions of lower 3.8 kernels
uname -a
- Check if the previous version is installed
yum list installed | grep docker
- Uninstall old docker
yum remove -y docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-selinux \
docker-engine-selinux \
docker-engine
- Install the necessary software packages for docker
yum install -y yum-utils device-mapper-persistent-data lvm2
- Set up Yum source
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
- View docker version
yum list docker-ce --showduplicates | sort -r
- Select the version to install (the latest installation by default needs to wait for a while, and then press y)
yum install docker-ce
- Start and set boot up
systemctl start docker
systemctl enable docker
- Check whether the installation is successful. Check the installation version
docker version
Installation successful!!!!!