1. Installation Environment

    Linux version: CentOS Linux release 7.9.2009 (Core)

    System version: Linux 3.10.0-1160.el7.x86_64

  2. system update


    Execute the system update command to update the system

    yum update
    install yum-utils device-mapper-persistent-data lvm2
    yum install -y yum-utils device-mapper-persistent-data lvm2
  3. Configure local mirror

    yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
  4. Install docker community edition


yum list docker-ce --showduplicates | sort -ryum install 3:20.10.9-3.el7

picture

yum install docker-ce18.03.1.ce

picture

picture

View docker version

docker version

picture

start docker

systemctl start docker

set auto start

systemctl enable docker

Complete the installation of docker