GitLab CI/CD 的报错如下:
Get https://registry-1.docker.io/v2/library/openjdk/manifests/11: Get https://auth.docker.io/token?scope=repository%3Alibrary%2Fopenjdk%3Apull&service=registry.docker.io: read tcp 172.17.0.2:34818->54.236.165.68:443: read: connection reset by peer
私有镜像仓库是通过 docker-compose 启动的,docker container logs -f docker-registry_registry_1
的日志如下:
time="2021-07-20T10:21:00.32369399Z" level=warning msg="error authorizing context: basic authentication challenge for realm "Registry": invalid authorization credential" go.version=go1.11.2 http.request.host="localhost:5000" http.request.id=0c53faae-b4f7-4045-aaca-5f46f695e5e8 http.request.method=GET http.request.remoteaddr="172.19.0.1:39438" http.request.uri="/v2/" http.request.useragent="docker/18.09.9 go/go1.11.13 git-commit/039a7df9ba kernel/5.4.0-73-generic os/linux arch/amd64 UpstreamClient(Docker-Client/18.09.9 \(linux\))"
time="2021-07-20T10:21:00.341567217Z" level=info msg="authorized request" go.version=go1.11.2 http.request.host="localhost:5000" http.request.id=c0e7d139-ddd0-42a9-8357-047f2d816659 http.request.method=GET http.request.remoteaddr="172.19.0.1:39444" http.request.uri="/v2/" http.request.useragent="docker/18.09.9 go/go1.11.13 git-commit/039a7df9ba kernel/5.4.0-73-generic os/linux arch/amd64 UpstreamClient(Docker-Client/18.09.9 \(linux\))"
time="2021-07-20T10:21:00.341643848Z" level=info msg="response completed" go.version=go1.11.2 http.request.host="localhost:5000" http.request.id=c0e7d139-ddd0-42a9-8357-047f2d816659 http.request.method=GET http.request.remoteaddr="172.19.0.1:39444" http.request.uri="/v2/" http.request.useragent="docker/18.09.9 go/go1.11.13 git-commit/039a7df9ba kernel/5.4.0-73-generic os/linux arch/amd64 UpstreamClient(Docker-Client/18.09.9 \(linux\))" http.response.contenttype="application/json; charset=utf-8" http.response.duration=3.213474ms http.response.status=200 http.response.written=2
在 ECS 上 publish 镜像到私有镜像仓库没问题,但在 GitLab CI/CD 中却不行,有人知道是什么问题吗?😭
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.