Docker Configuration Domestic free registry mirror
- 2020-06-15 10:51:46
- OfStack
Due to the special network environment in China, we often fail to pull the mirror image from Docker Hub, and the speed is extremely slow.
Then we can configure docker with one domestic registry mirror. When the mirror we need is in mirror, it will be returned directly. If not, it will be pulled from Docker Hub. Whether registry mirror is used or not is transparent to Docker users.
DaoCloud provides the first Docker Hub mirror service in China, and it is free, which greatly improves the enthusiasm of domestic Docker users. Thank you very much DaoCloud.
Method of use
Modify the Docker profile /etc/default/docker as follows:
DOCKER_OPTS="--registry-mirror=http://aad0405c.m.daocloud.io"
use
service docker restart
Restart the Docker service.
Now use
docker pull
It's very nice to pull the mirror, very fast. Thanks again to DaoCloud.