报错:

Using default tag: latest The push refers to repository [192.168.0.155:5000/trade-gateway] Get "https://192.168.0.155:5000/v2/": http: server gave HTTP response to HTTPS client

背景:

推送镜像到仓库异常

docker push 192.168.0.155:5000/trade-gateway

解决方案:

(1)修改/etc/docker/daemon.json文件,如下

"insecure-registries": ["192.168.0.155:5000"]

(2)然后重启docker: systemctl restart docker

(3)查看当前registry容器

(4)重新运行registry:docker run -d -p 5000:5000 registry

(5)再次运行上传镜像到私有仓库:docker push 192.168.0.155:5000/trade-gateway

Logo

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

更多推荐