标签:inux 阿里云 UNC 阿里 res centos 配置 eof --
# yum 包更新到最新
yum update
# 安装需要的软件包, yum-util 提供yum-config-manager功能,另外两个是devicemapper驱动依赖的
yum install -y yum-utils device-mapper-persistent-data lvm2
# 设置 yum 源
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
# 安装docker,出现输入的界面都按 y
yum install -y docker-ce
# 查看docker版本,验证是否验证成功
docker -v
# 启动 docker
systemctl start docker
# 开机启动docker
systemctl enable docker
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-‘EOF‘
{
"registry-mirrors": ["https://kydd1kfl.mirror.aliyuncs.com"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-‘EOF‘
{
"registry-mirrors": ["https://mirror.ccs.tencentyun.com"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker
# 重启docker
systemctl restart docker
标签:inux 阿里云 UNC 阿里 res centos 配置 eof --
原文地址:https://www.cnblogs.com/asaawan/p/14897187.html