Centos7.9安装Docker

1.sudo yum install -y yum-utils device-mapper-persistent-data lvm2
2.sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
2.加速版:
sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
sudo yum makecache fast

3.sudo yum install -y docker-ce docker-ce-cli containerd.io

4.sudo systemctl start docker

5.sudo systemctl enable docker

6.sudo docker run hello-world

你可能感兴趣的:(docker,容器,运维)