Stock Dock in China / Asia

It is very slow when you pull images from the official docker repository, and in China.

I am not asking for a working solution on local because I already found https://github.com/docker/docker-registry . I ask if there is an alternative repository in China / Asia, and faster, like many of them as sources for the Debian repository?

Thanks.

+7
source share
3 answers

As I know,

dockerpull has published its local repository, so you can simply place your host in front of the repository as follows:

docker pull daocloud.io/ubuntu:14.04 

And a more graceful way is to use the registry mirror from daocloud, add the line below in /etc/default/docker.io or / etc / default / docker

 DOCKER_OPTS="$DOCKER_OPTS --registry-mirror=http://YOUR_ID.m.daocloud.io" 

Please note that YOUR_ID must be replaced with a registered ID, which is provided after registering for an account at www.daocloud.io. While lunch is nearly free, you get 10 GB of bandwidth every month.

+11
source

In China there is an official docker mirror.

https://docs.docker.com/registry/recipes/mirror/#use-case-the-china-registry-mirror

You can add " https://registry.docker-cn.com " to the registry mirrors array in /etc/docker/daemon.json to pull the default mirror from the Chinese registry.

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

+4
source

As a user of the Docker Toolbox, you can create a docker using --engine-registry-mirror https://registry.docker-cn.com . eg.

 docker-machine create -d virtualbox --engine-registry-mirror https://registry.docker-cn.com dev 

or add it in docker settings in ~\.docker\machine\machines\<machine name>\config.json as follows.

 "HostOptions": { //... "EngineOptions": { //... "RegistryMirror": [ "https://registry.docker-cn.com" ], "InstallURL": "https://get.docker.com" }, 

other mirrors:

0
source

Source: https://habr.com/ru/post/983569/


All Articles