问题

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

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

背景

nexus部署了公司内部的私有仓库,使用了8440端口,nexus配置如下
在这里插入图片描述
在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

重试即可

Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐