Docker warehouse to domestic sources

Docker official warehouses abroad, slower, can be replaced by domestic warehouse accelerated.

1 Use Ali cloud docker accelerator.

Ali cloud for an account,
open a connection https://cr.console.aliyun.com/#/accelerator copy of your exclusive accelerator address.

Modifications Modifications daemon configuration file used /etc/docker/daemon.json Accelerator (4 following commands is executed individually)

Note that the accelerator is https://jxus37ad.mirror.aliyuncs.com address of the applicant, this is only for demonstration purposes, but a user to fill in their own application accelerator addresses according to their own use.

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

2 provided the use of docker-cn mirror source

1 /etc/docker/daemon.json edit files, and enter the mirror source address docker-cn

sudo nano /etc/docker/daemon.json

Enter the following

{
  "registry-mirrors": ["https://registry.docker-cn.com"]
}

3 Restart docker Service

sudo service docker restart
Published 26 original articles · won praise 1 · views 3071

Guess you like

Origin blog.csdn.net/gandongusa/article/details/104369328