Skip to content
This repository has been archived by the owner on Sep 12, 2018. It is now read-only.

/v1/users gives 404 if specifying DOCKER_REGISTRY_CONFIG #478

Closed
matthughes opened this issue Jul 18, 2014 · 7 comments
Closed

/v1/users gives 404 if specifying DOCKER_REGISTRY_CONFIG #478

matthughes opened this issue Jul 18, 2014 · 7 comments

Comments

@matthughes
Copy link

If I take the standard container and run it via:

docker run -i -t -p 5000:5000 registry:0.7.3

I am succesfully able to curl /v1/users/ endpoint. If I specify a config override using an exact copy of config-sample.yml, I get 404:

  1. copy config-sample.yml into current directory
  2. Run
    docker run -i -t -p 5000:5000 -v pwd:/etc/docker-config -e DOCKER_REGISTRY_CONFIG="/etc/docker-config/config-sample.yml" registry:0.7.3

I know this sounds weird, but it is 100% reproducible. It's the same config file so it should have the same standalone=true.

@matthughes
Copy link
Author

Appears this is a regression introduced in 0.7.2. The above command worked fine when run against 0.7.1.

@matthughes
Copy link
Author

Same config running against 0.7.1 vs 0.7.2. The standalone mode stays the same in the headers, but still no users endpoint:

>
< HTTP/1.1 200 OK
* Server gunicorn/18.0 is not blacklisted
< Server: gunicorn/18.0
< Date: Fri, 18 Jul 2014 19:25:53 GMT
< Connection: keep-alive
< X-Docker-Registry-Standalone: mirror
< Expires: -1
< Content-Type: application/json
< Pragma: no-cache
< Cache-Control: no-cache
< Content-Length: 4
< X-Docker-Registry-Version: 0.7.1
< X-Docker-Registry-Config: dev
<
* Connection #0 to host localhost left intact
truevagrant@vagrant-ubuntu-trusty-64:/vagrant/docker/registry$ curl --insecure -v http://localhost:5000/_ping
* Hostname was NOT found in DNS cache
*   Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 5000 (#0)
> GET /_ping HTTP/1.1
> User-Agent: curl/7.35.0
> Host: localhost:5000
> Accept: */*
>
< HTTP/1.1 200 OK
* Server gunicorn/18.0 is not blacklisted
< Server: gunicorn/18.0
< Date: Fri, 18 Jul 2014 19:26:02 GMT
< Connection: keep-alive
< X-Docker-Registry-Standalone: mirror
< Expires: -1
< Content-Type: application/json
< Pragma: no-cache
< Cache-Control: no-cache
< Content-Length: 4
< X-Docker-Registry-Version: 0.7.2
< X-Docker-Registry-Config: dev
<
* Connection #0 to host localhost left intact
truevagrant@vagrant-ubuntu-trusty-64:/vagrant/docker/registry$ curl --insecure -v http://localhost:5000/v1/users/
* Hostname was NOT found in DNS cache
*   Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 5000 (#0)
> GET /v1/users/ HTTP/1.1
> User-Agent: curl/7.35.0
> Host: localhost:5000
> Accept: */*
>
< HTTP/1.1 404 NOT FOUND
* Server gunicorn/18.0 is not blacklisted
< Server: gunicorn/18.0
< Date: Fri, 18 Jul 2014 19:26:16 GMT
< Connection: keep-alive
< Content-Type: text/html
< Content-Length: 233
< X-Docker-Registry-Version: 0.7.2
< X-Docker-Registry-Config: dev
<
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>404 Not Found</title>
<h1>Not Found</h1>
<p>The requested URL was not found on the server.  If you entered the URL manually please check your spelling and try again.</p>
* Connection #0 to host localhost left intact

@dmp42
Copy link
Contributor

dmp42 commented Jul 18, 2014

Please use 0.7.3

@matthughes
Copy link
Author

That's what I am using. I just was trying to help by figuring out where the bug was introduced.

@dmp42
Copy link
Contributor

dmp42 commented Jul 18, 2014

Can you copy your config_sample.yml ?

Thanks.

@dmp42
Copy link
Contributor

dmp42 commented Jul 18, 2014

Put otherwise: are you sure you copied config_sample from 0.7.3 and not from master?

Here, things work OK when using the config from 0.7.3 with registry 0.7.3 - and they don't when using config from master with registry 0.7.3 (which is expected, given #444).

Can you confirm?

@matthughes
Copy link
Author

Yes that was the issue! Thanks. Did seem a bit too strange to be real.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants