Docker 配置国内镜像拉取中心,Configure docker to use faster registries in China.

Networking in China is really bad when it comes to using some cloud based tools like docker, it's usually a long time or just timeout you get trying to pull an image or even login to docker hub, luckily, so we need to change our docker registry mirror to national one in China.

Most often we get docker installed with installer, so we just add one registry to docker config by GUI.

The other way is by modifying the daemon.json in docker configuration folder .docker under current user home directory


And the file looks like this:

The GUI has set these up for us.

After all the above has been done, restart docker and try logging in or pulling one image, the streaming has become very fast.

Registries used in China in this article to accelerate the network condition:

#One for dao cloud
"http://f2d6cb40.m.daocloud.io"
#One for docker-cn, this one is easier to remember
"https://registry.docker-cn.com"

猜你喜欢

转载自www.cnblogs.com/hualiu0/p/10270443.html