1.安装必须的依赖:sudo yum install -y yum-utils device-mapper-persistent-data lvm2
2.设置yum源:sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
或阿里源:sudo yum
-
config
-
manager
-
-
add
-
repo http:
/
/
mirrors.aliyun.com
/
docker
-
ce
/
linux
/
centos
/
docker
-
ce.repo
3.安装docker-ce:sudo yum install docker-ce docker-ce-cli containerd.io
原文地址:https://www.cnblogs.com/miaomaiomaio/p/11520838.html
时间: 2024-10-10 22:23:06