Open glinders opened 8 years ago
Hello,
I can confirm the same behavior: I just run
docker run -d \ -e ENV_DOCKER_REGISTRY_HOST=docker.my.rp.com \ -e ENV_DOCKER_REGISTRY_PORT=443 \ -e ENV_DOCKER_REGISTRY_USE_SSL=1 \ -p 8080:80 konradkleine/docker-registry-frontend:v2
When clicking any repository I get redirected to home. Thanks for helping !
Same issue here goes back to the home page, seems that the URL for the repository isn't correct in the application.
Maybe it should use something like this to obtain more info on an image:
http://host/v2/
+1
I'm experiencing the same behavior. I started the registry frontend with the same commands as @eLvErDe and I'm using a similar (nginx) setup as @glinders. I guess this issue is related to the ENV_MODE_BROWSE_ONLY variable is overwritten to true on line 41 of start-apache.sh? Will this be fixed in the future, or is there a fundamental problem?
Looks pretty fundamental to me per line 40:
# Overwrite browse-only option for now since only browse-only is working right now
+1
I am facing the exact same problem too, with similar setup. +1
Works for me...
docker-compose.yml
nginx:
image: "nginx:1.9"
ports:
- "443:443"
- "80:80"
links:
- registry:registry
- registryui:registryui
volumes:
- ./nginx/:/etc/nginx/conf.d:ro
registry:
image: registry:2
ports:
- "127.0.0.1:5000:5000"
environment:
REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY: /data
volumes:
- ./data:/data
registryui:
image: konradkleine/docker-registry-frontend:v2
ports:
- "127.0.0.1:8000:80"
environment:
ENV_DOCKER_REGISTRY_HOST: "username:password@registry.symphoni.io"
ENV_DOCKER_REGISTRY_PORT: "443"
ENV_DOCKER_REGISTRY_USE_SSL: 1
nginx registry:
cat nginx/registry.conf
upstream docker-registry {
server registry:5000;
}
#Point http requests to https
#server {
# listen 80 default_server;
# server_name _;
# return 301 https://$host$request_uri;
#}
server {
listen 443;
server_name registry.symphoni.io;
# SSL
ssl on;
ssl_certificate /etc/nginx/conf.d/domain.crt;
ssl_certificate_key /etc/nginx/conf.d/domain.key;
# disable any limits to avoid HTTP 413 for large image uploads
client_max_body_size 0;
# required to avoid HTTP 411: see Issue #1486 (https://github.com/docker/docker/issues/1486)
chunked_transfer_encoding on;
location /v2/ {
# Do not allow connections from docker 1.5 and earlier
# docker pre-1.6.0 did not properly set the user agent on ping, catch "Go *" user agents
if ($http_user_agent ~ "^(docker\/1\.(3|4|5(?!\.[0-9]-dev))|Go ).*$" ) {
return 404;
}
# To add basic authentication to v2 use auth_basic setting plus add_header
auth_basic "registry.localhost";
auth_basic_user_file /etc/nginx/conf.d/registry.password;
add_header 'Docker-Distribution-Api-Version' 'registry/2.0' always;
proxy_pass http://docker-registry;
proxy_set_header Host $http_host; # required for docker client's sake
proxy_set_header X-Real-IP $remote_addr; # pass on real client's IP
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 900;
}
}
nginx registryui
cat nginx/registryui.conf
upstream docker-registryui {
server registryui:80;
}
server {
listen 80;
server_name registry.symphoni.io;
# SSL
#ssl on;
#ssl_certificate /etc/nginx/conf.d/domain.crt;
#ssl_certificate_key /etc/nginx/conf.d/domain.key;
# disable any limits to avoid HTTP 413 for large image uploads
client_max_body_size 0;
# required to avoid HTTP 411: see Issue #1486 (https://github.com/docker/docker/issues/1486)
chunked_transfer_encoding on;
location / {
# To add basic authentication to v2 use auth_basic setting plus add_header
auth_basic "registry.localhost";
auth_basic_user_file /etc/nginx/conf.d/registry.password;
proxy_pass http://docker-registryui;
proxy_set_header Host $http_host; # required for docker client's sake
proxy_set_header X-Real-IP $remote_addr; # pass on real client's IP
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 900;
}
}
The problem i have is that i cannot seem to get this to run in another location ( IE / or /ui/ ) under the SSL setup. I have to leave it on port 80, which is insecure.
Hi,
It look like that I've had the same probleme (API ok, frontend KO...) By generating log I've that the frontend add always, the number of tag by page to the registry API... so it can't work.
For example what I've of bad request:
GET /v2/alpha/25/tags/list
GET /v2/alpha/25/manifests/14.04-8.0.4v0.3
To give more explanation (sorry I cut everything that I think useless, don't hesitate to ask)
location /v2/ {
if ($http_user_agent ~ "^(docker\/1\.(3|4|5(?!\.[0-9]-dev))|Go ).*$" ) {
return 404;
}
add_header 'Docker-Distribution-Api-Version' 'registry/2.0' always;
proxy_pass http://upstreams:5000;
}
location / {
if ($http_user_agent ~ "^(docker\/1\.(3|4|5(?!\.[0-9]-dev))|Go ).*$" ) {
return 404;
}
proxy_pass http://upstreams:8000;
}
registry-front:
container_name: registry-front
hostname: registry-front
image: konradkleine/docker-registry-frontend:v2
ports:
- 8000:80
environment:
ENV_DOCKER_REGISTRY_HOST: "172.17.0.1"
ENV_DOCKER_REGISTRY_PORT: 80
ENV_DOCKER_REGISTRY_USE_SSL: 0
ENV_DEFAULT_REPOSITORIES_PER_PAGE: 50
ENV_DEFAULT_TAGS_PER_PAGE: 25
ENV_MODE_BROWSE_ONLY: "false"
=> conclusion: The 25 who appear in my logs are comming from the variable "ENV_DEFAULT_TAGS_PER_PAGE"
=> the patch is by adding the rewrite nearly after the location:
location /v2/ {
rewrite /v2/([^/]+)/\d+/(.+)$ /v2/$1/$2 break;
And now : no more problem :)
Yes, it look lire horryfull but it work very fine and now I can work and wait:)
I was just wondering if there have been any updates on this issue, it is something we are currently experiencing
+1
+1 Any solutions so far on this?
Expected behavior and Actual behavior
When I click on one of the repositories listed, I expect to be taken to a page that list details for this particular repository. Instead, I always end up at the home page.
Steps to reproduce the problem
Open URL:
http://dockerfrontend.au.ivc/home
This shows me a big blue button that reads
Browse repositories
and when I click on it. I am taken to pagehttp://dockerfrontend.au.ivc/repositories/20
.This shows me a list of two repositories. When I hover above the links I see:
http://dockerfrontend.au.ivc/repository/buildbox
http://dockerfrontend.au.ivc/repository/hello-world
When I click on one of these two links, I am always taken to page
http://dockerfrontend.au.ivc/home
I tried your versions
v2
andv2-develop
and registry versions2
,2..2.0
and2.3.1
. All combinations behave the same.Specifications
This is my YML file for the registry, nginx and the frontend for docker-compose:
These are my nginx conf files:
Your images I use:
The log of starting everything, getting the repositories and clicking on the
buildbox
repository, which takes me back to the home page:If I use URL
http://dockerfrontend.au.ivc/repository/buildbox
directly, the output is: