How to create docker registry mirror

青春壹個敷衍的年華 提交于 2019-12-06 16:01:40

The problem is the command:

$ docker --registry-mirror=http://<my-docker-mirror-host> -d

Is intended for configuring the Docker daemon, not the Docker client. In boot2docker (which is what you're presumably using), this means you need to log into the boot2docker VM and run those commands there.

You can log into the boot2docker VM with boot2docker ssh. Whilst you could just stop the daemon and restart with the new commands, it's best to edit the file /var/lib/boot2docker/profile which will be used each time boot2docker restarts. Just add something like:

EXTRA_ARGS="--registry-mirror=http://<my-docker-mirror-host>"

If you then restart boot2docker, you should be good to go.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!