docker注册表:https而不是http

问题描述 投票:0回答:1

我刚刚部署了Docker注册表。

我可以使用以下方式访问它:

$ curl -I chart-example.local/v2/                                                                                                                         
HTTP/1.1 200 OK
Content-Length: 2
Content-Type: application/json; charset=utf-8
Date: Tue, 28 Jan 2020 20:10:35 GMT
Docker-Distribution-Api-Version: registry/2.0
Vary: Accept-Encoding
X-Content-Type-Options: nosniff

但是,当我尝试向其推送本地图像时,却收到此消息:

$ docker push chart-example.local/feedly:latest                                                                                                                                                                                                                                                                          
The push refers to repository [chart-example.local/feedly]
Get https://chart-example.local/v2/: x509: certificate has expired or is not yet valid

为什么docker试图使用https而不是http进行访问?

docker kubernetes docker-registry
1个回答
0
投票

Docker默认使用https进行安全保护。您可以通过使用以下内容修改daemon.json文件来覆盖此设置。 <在生产中使用此设置。 { "insecure-registries" : ["chart-example.local"] }

请参阅此链接以获取更多信息:https://docs.docker.com/registry/insecure/
© www.soinside.com 2019 - 2024. All rights reserved.