Частный реестр Docker / v2 / _catalog не тянет репозитории, но / v2 / repo / tags / работает? - PullRequest
0 голосов
/ 13 февраля 2019

Я пытаюсь перечислить репозитории в своем личном реестре, но по неизвестной причине опрос /v2/_catalog не возвращает никаких результатов, как при указании репо возвращает результаты.

Я также могу без проблем выдвигать и извлекать данные из этого репозитория, поэтому я весьма озадачен.

  • В реестре для хранения используется корзина S3.
  • Использует htpasswd для контроля доступа
// Doesn't work =>
curl -kv -X GET https://registry.example.com/v2/_catalog  --user user:pass

// Does Work =>
curl -kv -X GET https://registry.example.com/v2/nginx/tags/list  --user user:pass

Вывод неудавшегося запроса curl:

*   Trying 000.000.000.000...
* TCP_NODELAY set
* Connected to registry.example.com (000.000.000.000 port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/cert.pem
  CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS change cipher, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
* ALPN, server accepted to use h2
* Server certificate:
*  subject: O=Acme Co; CN=Kubernetes Ingress Controller Fake Certificate
*  start date: Feb 13 16:27:49 2019 GMT
*  expire date: Feb 13 16:27:49 2020 GMT
*  issuer: O=Acme Co; CN=Kubernetes Ingress Controller Fake Certificate
*  SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Server auth using Basic with user 'user'
* Using Stream ID: 1 (easy handle 0x7f83b1800400)
> GET /v2/_catalog HTTP/2
> Host: registry.example.com
> Authorization: Basic asdfasdfasdfasdfasdfasdfa
> User-Agent: curl/7.54.0
> Accept: */*
> 
* Connection state changed (MAX_CONCURRENT_STREAMS updated)!
< HTTP/2 502 
< server: nginx/1.15.8
< date: Wed, 13 Feb 2019 17:27:17 GMT
< content-type: text/html
< content-length: 157
< strict-transport-security: max-age=15724800; includeSubDomains
< 
<html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx/1.15.8</center>
</body>
</html>
* Connection #0 to host registry.example.com left intact
...