报错信息:
Error response from daemon: Get "https://192.168.88.131:5000/v2/": http: server gave HTTP response to HTTPS client
Unable to find image '192.168.88.131:5000/docker_storage/heima-leadnews-app-gateway:latest' locally
docker: Error response from daemon: Get "https://192.168.88.131:5000/v2/": http: server gave HTTP response to HTTPS client.
Error response from daemon: Get "https://192.168.88.131:5000/v2/": http: server gave HTTP response to HTTPS client
这个错误表明Docker守护进程正在尝试通过HTTPS连接到 192.168.88.131:5000,但服务器只支持HTTP连接。这可能是由于Docker配置或服务器配置问题导致的。
要解决这个问题,可以尝试以下方法来调整配
修改 Docker 配置:
- 登录到运行 Docker 的主机。
- 打开 Docker 守护进程的配置文件,通常是
/etc/docker/daemon.json
。 -
vi /etc/docker/daemon.json
- 确保文件中存在
"insecure-registries"
字段,并将其设置为包含您的服务器地址和端口的数组。例如: -
{ "insecure-registries": ["192.168.88.131:5000"] }
- 保存并关闭文件。
- 重新启动 Docker 服务:
-
systemctl restart docker