Appearance
鲸舰安装程序插件
centos
安装docker
shell
# 安装yum工具
yum install -y yum-utils \
device-mapper-persistent-data \
lvm2 --skip-broken
# 设置docker镜像源
## 步骤1
yum-config-manager \
--add-repo \
https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
## 步骤2
sed -i 's/download.docker.com/mirrors.aliyun.com\/docker-ce/g' /etc/yum.repos.d/docker-ce.repo
## 步骤3
yum makecache fast
# 安装docker-ce
yum install -y docker-ce设置docker自启动
shell
# 设置docker为服务启动
systemctl enable docker
# 启动docker
systemctl start docker