使用docker compose拉起docker镜像时,若出现如下报错
Error response from daemon: Get "https://devops.test.cn:5000/v2/": http: server gave HTTP response to HTTPS client
表示Docker守护进程无法从指定url获取响应,
可能原因有以下:
针对配置问题,处理方式如下:
/etc/docker/ 目录下放置 daemon.json
{ "insecure-registries": [ "devops.test.cn:5000" ] }
然后
# 刷新配置文件 systemctl daemon-reload # 重启 systemctl restart docker
C:\Users\用户名.docker 目录下修改 daemon.json
{ "builder": { "gc": { "defaultKeepStorage": "20GB", "enabled": true } }, "experimental": false, "insecure-registries": [ "devops.test.cn:5000" ] }
然后重启