kwk / docker-registry-frontend

Browse and modify your Docker registry in a browser.
https://registry.hub.docker.com/u/konradkleine/docker-registry-frontend/
MIT License
1.68k stars 616 forks source link

Repository list fails to load #109

Open gh2k opened 8 years ago

gh2k commented 8 years ago

Hi,

I've just thrown up an instance of this but it doesn't appear to be working... I'm running the registry frontend on the same host as the registry on port 5000, and launching with:

docker run -d -e ENV_DOCKER_REGISTRY_HOST=fqdn.of.docker.host -e ENV_DOCKER_REGISTRY_PORT=5000 -p 9001:80 --name registryui konradkleine/docker-registry-frontend:v2

The repository load times out. I'm seeing the following error in the response to _catalog?n=20&last= (html formatting removed):

The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /v2/_catalog
Reason: Error reading from remote server

Any ideas? Unsure how to diagnose.

xiekuncn commented 8 years ago

Maybe you can try-p 443:443 instead of -p -p 9001:80. And also can try run the images by docker-compose, you can find a template at example-setup folder.

lordzuko commented 8 years ago

@xiekuncn I am also trying to do something similar and I am facing the same problem. I am trying to run the registory front end application on port 5000 with SSL encryption. I have referenced following command to run the docker image.

sudo docker run \ -d \ -e ENV_DOCKER_REGISTRY_HOST=ENTER-YOUR-REGISTRY-HOST-HERE \ -e ENV_DOCKER_REGISTRY_PORT=ENTER-PORT-TO-YOUR-REGISTRY-HOST-HERE \ -e ENV_USE_SSL=yes \ -v $PWD/server.crt:/etc/apache2/server.crt:ro \ -v $PWD/server.key:/etc/apache2/server.key:ro \ -p 443:443 \ konradkleine/docker-registry-frontend:v2

I have made a few changes in the home page of the application and am launching using: docker run -d --name docker-registry-frontend -e ENV_DOCKER_REGISTRY_HOST=<fqdn_of_host> -e ENV_DOCKER_REGISTRY_PORT=5000 -e ENV_USE_SSL=yes -v /root/certs/<domain_name>.crt:/etc/apache2/server.crt:ro -v /root/certs/<domain_name>.key:/etc/apache2/server.key:ro -p 443:443 docker-registry-frontend:v2

Now I am trying to access the repository using browser and the list fails to load.
When I click on "Browse Repositories" on the main page it goes to "localhost/repositories/20"; (searches for 20; which shows nothing)
The snapshot can be found here https://i.stack.imgur.com/cp1IQ.png.

lordzuko commented 8 years ago

I found the solution : ENV_DOCKER_REGISTRY_USE_SSL=1 needs to be added to the command

schwimmfuzzi commented 7 years ago

I am still facing that issue (same as @gh2k). The registry and the frontend are running on the same machine. I am inside a protected infrastructure, so no need for SSL (flags are not set). The registry is running properly, but it wont list repos because it is requesting the frontends url:8080 for the catalogue, not for the registries url:5000.

When I request url:5000 manually, it works properly and prints following output

{"repositories":[]}

I used the compose file from the examples to setup the stuff.

p-diogo commented 7 years ago

Facing the same issue as @schwimmfuzzi above

OpakAlex commented 7 years ago

@PedroMD what is solution for this?

lordzuko commented 7 years ago

@PedroMD @OpakAlex Setting ENV_DOCKER_REGISTRY_USE_SSL=1 needs to be added to the command worked for me.

p-diogo commented 7 years ago

tks @lordzuko. Not using it right now, but will give it a try if I do need it...

moenka commented 7 years ago

Same problem here even with ENV_DOCKER_REGISTRY_USE_SSL=1 and ENV_DOCKER_REGISTRY_PORT=5000 the frontend uses port 80. Seems like a bug with the environment variable?

Using Server Version: 17.03.1-ce

MadLittleMods commented 7 years ago

This seems like an issue with 127.0.0.1 vs localhost.

The proxy seems to request 127.0.0.1 which throws some SSL untrusted errors with my self signed certs for localhost. https://127.0.0.1:5063/v2/_catalog has SSL issues but https://localhost:5063/v2/_catalog loads just fine and is trusted.

Some lines from docker logs registry-frontend

[proxy:error] [pid 33:tid 140678347736832] (111)Connection refused: AH00957: HTTPS: attempt to connect to 127.0.0.1:5063 (localhost) failed
[proxy:error] [pid 33:tid 140678347736832] AH00959: ap_proxy_connect_backend disabling worker for (localhost) for 60s

docker run -d \
  -p 5063:5000 \
  --restart=always \
  --name registry-ce \
  -e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/localhost.crt \
  -e REGISTRY_HTTP_TLS_KEY=/certs/localhost.key \
  -v /Users/eric/my-ce-docker-registry:/var/lib/registry \
  -v /Users/eric/my-ce-docker-registry/my-certs/:/certs \
  registry:2
docker run -d \
  -e ENV_DOCKER_REGISTRY_HOST=localhost \
  -e ENV_DOCKER_REGISTRY_PORT=5063 \
  -e ENV_DOCKER_REGISTRY_USE_SSL=1 \
  -p 5065:80 \
  --name registry-frontend \
  konradkleine/docker-registry-frontend:v2