Installation and use of docker under centos7

Time:2020-10-22
  • View Linux version

Docker does not support versions of lower 3.8 kernels

uname -a 

Installation and use of docker under centos7

  • Check if the previous version is installed
 yum list installed | grep docker

Installation and use of docker under centos7

  • 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

Installation and use of docker under centos7

  • 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

Installation and use of docker under centos7

  • Select the version to install (the latest installation by default needs to wait for a while, and then press y)
yum install docker-ce

Installation and use of docker under centos7

  • Start and set boot up
systemctl start docker
systemctl enable docker
  • Check whether the installation is successful. Check the installation version
docker version

Installation and use of docker under centos7
Installation successful!!!!!

Recommended Today

Regular expression sharing for checking primes

This regular expression is shown as follows: Regular expressions for checking prime numbers or not To use this positive regular expression, you need to convert the natural number into multiple 1 strings. For example, 2 should be written as “11”, 3 should be written as “111”, 17 should be written as “11111111111”. This kind of […]