设置Docker容器加速及允许通过http协议拉取镜像

操作步骤

  1. 指令如下
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18

sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
  "registry-mirrors": ["https://cr58lvy7.mirror.aliyuncs.com"],
  "insecure-registries":["192.168.30.174:80"]
}
EOF

sudo tee /etc/docker/daemon.json <<-'EOF'
{
  "insecure-registries":["172.16.100.100:80"]
}
EOF

sudo systemctl daemon-reload
sudo systemctl restart docker

相关教程

  1. Docker 镜像加速
  2. 镜像加速器