一、配置阿里云镜像仓库
- 登录阿里云官网,并登录
- 点击产品 - 容器 - 容器与镜像服务ACR - 管理控制台 - 镜像工具 - 镜像加速器



二、配置docker代理
#1. 创建docker相关的systemd文件
mkdir -p /etc/systemd/system/docker.service.d
#2. 新建docker代理配置文件
vim /etc/systemd/system/docker.service.d/http-proxy.conf
[Service]
Environment="HTTP_PROXY=http://IP或域名:8080"
Environment="HTTPS_PROXY=https://IP或域名:8080"
Environment="NO_PROXY=your-registry.com,10.10.10.10,*.example.com"
#3. 重启systemd和docker
systemctl daemon-reload
sudo systemctl restart docker