I'm trying to set up a private docker registry behind Apache Proxy (name: xxx.org). The machine for the docker registry is a Virtual Machine running on centos 8 (hostname: dockerhub), different from the Apache server machine but on the same network and I can reach from Apache machine (through ping or ssl for example). But I can't reach my docker registry.
I followed the documentation: https://docs.docker.com/registry/deploying/#run-a-local-registry I deployed this registry on dockerhub VM:
docker run -d -p 5000:5000 --restart=always --name registry registry:2 -v "$(pwd)"/certs:/certs -e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/domain.crt -e REGISTRY_HTTP_TLS_KEY=/certs/domain.key
With this apache ssl config (on xxx.org machine):
ProxyPass /dockerhub http://dockerhub:5000/v2 Keepalive=On
ProxyPassReverse /dockerhub http://dockerhub:5000/v2
The port 5000 in dockerhub VM is open (it's working for a simple registry as described in the doc) and I have had these settings on sytemd/system/docker.service.d/http-proxy.conf
[Service] Environment="NO_PROXY=localhost,127.0.0.1,dockerhub"
The port 443 is working on Apache machine(I do other redirections). But I can't push basic image like that : docker push xxx.org/dockerhub/ubuntu:16.04 I have a retrying loop and the end message:
received unexpected HTTP status: 500 Internal Server Error
I'm really confused and I reaaly don't know where is the error: ProxyPass? Docker Registry? Thanks