debian 安装docker 和 配置 阿里云加速

debian 安装docker 和 配置 阿里云加速

debian 安装 docker

curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun

阿里云加速

https://cr.console.aliyun.com/cn-hangzhou/instances/mirrors

修改配置信息

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

查看

docker info

...
Registry Mirrors:
  https://xxxxxx.mirror.aliyuncs.com/
 Live Restore Enabled: false