background
The Internet speed of docker's official image warehouse is poor. We need to set up a domestic image service.
My MacOS docker version is as follows
Set the docker domestic image warehouse address
- Click Settings
- Click on Docker Engine
- Modify the configuration file and add
registry-mirrors
{
"builder": {
"gc": {
"defaultKeepStorage": "20GB",
"enabled": true
}
},
"data-root": "/var/lib/docker",
"experimental": false,
"features": {
"buildkit": true
},
"registry-mirrors": [
"https://docker.mirrors.ustc.edu.cn/",
"https://hub-mirror.c.163.com/",
"https://registry.docker-cn.com/"
]
}
Other references
Refer to Alibaba Cloud's mirror acceleration document: https://cr.console.aliyun.com/cn-hangzhou/instances/mirrors
The above link requires logging in to the Alibaba Cloud account to obtain the mirror accelerator address for the exclusive user.
This address can also be configured toregistry-mirrors