docker toolbox下拉取镜像,报这个错误: Error response from daemon: Get https://ip:port/v2/: http: server gave HTTP response
如果是linux环境,通过可以改/etc/docker/daemon.json来解决
但是windows下的的docker toolbox,就没有这个路径啦,需要做以下操作:
1.进入虚拟的docker bash中: cmd命令行输入 docker-machine ssh default
2.进入虚拟的docker bash后,编辑/var/lib/boot2docker/profile文件
sudo vi /var/lib/boot2docker/profile
在 --label provider=virtualbox 的下一行添加下述代码
--insecure-registry xxx.xxx.xxx.xxx:yyy
xxx.xxx.xxx.xxx 是我们的私有镜像仓库的 ip 地址,yyy 是你配置私有镜像仓库时设定的端口号
3.最后,重启dokcer服务:
sudo /etc/init.d/docker restart
然后,我们就可以拉取registry私有仓库的镜像了
参考来源:
启蒙:https://blog.csdn.net/weixin_43404791/article/details/108971842
(以上文字)toolbox详细操作:https://www.jianshu.com/p/2312f7ecdf03