来自阿里云的安装链接:https://developer.aliyun.com/article/110806
安装需要的软件包, 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
yum install docker-ce -y
配置docker镜像仓库位置:
注:阿里云账号获取镜像地址:https://cr.console.aliyun.com/cn-hangzhou/instances/mirrors
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["https://hq3cntt3.mirror.aliyuncs.com"],
"log-driver":"json-file",
"log-opts": {"max-size":"1024m", "max-file":"3"}
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker
|