docker配置国内镜像地址,解决无法pull镜像问题docker: Error response from daemon
问题:执行命令$ docker run -it --rm -p 8888:8080 tomcat:8.5.32报错Unable to find image 'tomcat:8.5.32' locallydocker: Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: requ...
·
问题:
执行命令
$ docker run -it --rm -p 8888:8080 tomcat:8.5.32
报错
Unable to find image 'tomcat:8.5.32' locally
docker: Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers).
See 'docker run --help'.
MAC解决问题
右键点击桌面顶栏的 docker 图标,选择 Preferences ,在 Daemon 标签(Docker 17.03 之前版本为 Advanced 标签)下的 Registry mirrors 列表中加入下面的镜像地址:
http://141e5461.m.daocloud.io
Linux
$ echo "DOCKER_OPTS=\"\$DOCKER_OPTS --registry-mirror=http://f2d6cb40.m.daocloud.io\"" | sudo tee -a /etc/default/docker
$ sudo service docker restart
更多推荐
已为社区贡献2条内容
所有评论(0)