Acclerate docker pull in China/Asia
As I know,
dockerpull published their local repository, so you can simply put their host in front of the repository this way:
docker pull daocloud.io/ubuntu:14.04
And a more graceful way is to use registry mirror from daocloud, append below line to /etc/default/docker.io or /etc/default/docker
DOCKER_OPTS="$DOCKER_OPTS --registry-mirror=http://YOUR_ID.m.daocloud.io"
Please be noted that YOUR_ID need to be replaced by your registered ID, which is provided after you register an account on www.daocloud.io. So far the lunch is almost free, you got 10GB bandwidth monthly to go.
As a Docker Toolbox user, you can create a docker machine with --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 the docker machine settings in ~\.docker\machine\machines\<machine name>\config.json
like this.
"HostOptions": {
//...
"EngineOptions": {
//...
"RegistryMirror": [
"https://registry.docker-cn.com"
],
"InstallURL": "https://get.docker.com"
},
other mirrors:
- docker-cn
- 163
- daocloud
- alicloud
- ustc
There is an official mirror from docker in China.
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 from the China registry mirror by default.
{ "registry-mirrors": ["https://registry.docker-cn.com"] }