问题

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

重试即可

GitHub 加速计划 / js / json
41.72 K
6.61 K
下载
适用于现代 C++ 的 JSON。
最近提交(Master分支:16 天前 )
960b763e 3 个月前
8c391e04 5 个月前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐