Changing the Image Source
If you cannot pull images from dockerhub.io, you are advised to configure the Docker image accelerator in advance and use other image sources to download the required Docker images.
To change the image source, perform the following steps:
- Create a Docker configuration file.
sudo mkdir -p /etc/docker sudo vi /etc/docker/daemon.json
- Press i to enter the insert mode. In the opened configuration file, add (or modify) the registry-mirrors field. Replace https://<docker-mirror> with the actual image acceleration address.
{ "registry-mirrors" : ["https://<docker-mirror>"] } - Press Esc, type :wq!, and press Enter to save the file and exit.
- Reload the Docker configuration for the modification to take effect.
sudo systemctl daemon-reload sudo systemctl restart docker
Parent topic: Common Operations