- 确认安装docker完成后并正常启动
mkdir -p /etc/docker
tee /etc/docker/daemon.json <<-'EOF' { "registry-mirrors": ["https://rvof9czj.mirror.aliyuncs.com"] } EOF
systemctl daemon-reload
systemctl restart docker
- 查看是否生效
docker info|grep "Registry Mirrors" -A 1
- 输出
Registry Mirrors: https://rvof9czj.mirror.aliyuncs.com/