docker设置国内镜像

linux设置镜像加速

sudo tee /etc/docker/daemon.json <<-'EOF'
{
  "registry-mirrors": ["https://tnxkcso1.mirror.aliyuncs.com"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker

mac设置镜像加速,适用于docker desktop for mac

{
  "experimental": false,
  "debug": false,
  "registry-mirrors": [
    "https://eqcxmbvw.mirror.aliyuncs.com"
  ]
}

从2020年4月开始阿里云容器镜像服务就开始收费了,珍惜免费的加速地址吧。

原文地址:https://www.cnblogs.com/jiftle/p/12683307.html