rpardini / docker-registry-proxy

An HTTPS Proxy for Docker providing centralized configuration and caching of any registry (quay.io, DockerHub, k8s.gcr.io)
Apache License 2.0
912 stars 170 forks source link

Can docker-registry-proxy connect to registries that are only reachable through https_proxy? #85

Closed ChristianCiach closed 3 years ago

ChristianCiach commented 3 years ago

Hi,

i want to use this container as a proxy for our internal docker-registries that are, themselves, only reachable throw an HTTPS proxy. Can this container be used with such registries? If so, how should the container be configured to make it work?

ChristianCiach commented 3 years ago

I think I can answer my own question:

No, the proxy-module of nginx does not support http-proxies to connect to the upstream servers.

As a workaround, you can use socat to create a tunnel through the http-proxy and then use nginx to connect to the socat-port on localhost. Stackoverflow answer: https://stackoverflow.com/a/46824465