error parsing HTTP 400 response body: unexpected end of JSON input: ""

问题

docker pull镜像没有问题,但是docker push镜像的时候报错

error parsing HTTP 400 response body: unexpected end of JSON input: ""

背景

nexus部署了公司内部的私有仓库,使用了8440端口,nexus配置如下
error parsing HTTP 400 response body: unexpected end of JSON input:
在nginx中使用xxx.xxx.com域名反向代理了8440端口
并且在docker中配置了使用http而不是https,配置如下:

"insecure-registries": ["xxx.xxx.com"]

docker pull镜像没有问题,但是docker push报错

解决

在host文件中加入

# 服务器ip(如120.77.82.4) 域名
120.77.82.4 xxx.xxx.com

重试即可

你可能感兴趣的:(docker,报错)