Docker Community Forums

Share and learn in the Docker community.

Private registry returns 404 on tags

(Alex Nederlof) #1

I tried to set-up docker cloud with a private third party registry, but when I try to run the service, it gives a 404 error on Request URL: It cannot find tags for this image. Because of that, I’m unable to create the service. When I go to my repository details, the images is added successfully but it does not load any tags because the endpoint 404s.

We run the latest official private docker repository with a basic HTTP authentication provided by the image itself (not our loadbalancer).

What can be wrong? Or is this a bug.

(Alex Nederlof) #2

Looks like this was reported before, but closed without a fix

(Alex Nederlof) #3

Here’s the NGinx log from my registry when I try to add an image. As you can see it does multiple calls, first without (or with incorrect) authentication, then with authentication.

"remote_addr": "", "status": 401, "request_time": 0.005, "request_uri": "/v2/recommender/tags/list", "request_method": "GET", 
"remote_addr": "", "status": 200, "request_time": 0.013, "request_uri": "/v2/recommender/tags/list", "request_method": "GET"
"remote_addr": "","status": 200, "request_time": 0.011, "request_uri": "/v2/recommender/tags/list", "request_method": "GET"
"remote_addr": "", "status": 404, "request_time": 0.000, "request_uri": "/v1/_ping", "request_method": "GET"
"remote_addr": "", "status": 401, "request_time": 0.004, "request_uri": "/v2/recommender/tags/list", "request_method": "GET"
"remote_addr": "", "status": 404, "request_time": 0.000, "request_uri": "/v1/_ping", "request_method": "GET"
"remote_addr": "", "status": 401, "request_time": 0.005, "request_uri": "/v2/recommender/tags/list", "request_method": "GET"
"remote_addr": "", "status": 200, "request_time": 0.012, "request_uri": "/v2/recommender/tags/list", "request_method": "GET"

(Jordancrawford) #4

I see the 404 on tags when viewing a URL like:[registry]/[repository]/ or when trying to launch a service from the repository (like[registry]/[repository]).

On the launch page, details like tags and default port map settings and entrypoint/run command aren’t shown.

Are you seeing this same issue?

My registry container is showing a 200 status code for requests made by Docker Cloud as the repository is added, but this is not show anything on the launch page (suggesting tags are cached with Docker Cloud?).

Can't launch from 3rd party registry image
(Jordancrawford) #5

In my case, if I just manually edit the stackfile then it can pull the repository down, but if I try and edit the service in the web interface I get 404 on the tags so the page hangs on “Loading image information…”.

(Alex Nederlof) #6

Yes, that is exactly the same problem as I have

(Jgranstrom) #7

I had this exact same issue with running a private registry v2 behind an nginx proxy.

After some research I noticed that the issue for me was that I was running the registry on a non-standard port 8080. It could still be added as a repository in docker cloud, and I could launch the service, but I got a 404 error notification and it could not get the service configuration in the launch page.

From what I could see this is a bug with an internal API call made by docker cloud for fetching the registry. It is querying something like “”. This was responding with an error for me. If I however removed the port in this request and made it manually I could get the registry back and it even contain a field “port: 8080”. It seems for me to be a bug in this request when having a non-standard port.

I changed the registry proxy to use standard ports 80/443 and this fixed the problem for me, service configuration is loaded with all the port mapping and so on correctly filled.

If you are not using custom ports then I’m really not sure why you are getting this error.

(Jordancrawford) #8

I use 443 (80 redirects to https) on my NGINX proxy.

What NGINX configuration are you people using? On my phone at the moment so can’t really post mine. I was thinking for a second that this issue affected all use of third party registries on Docker Cloud but it must be related to something in my setup.

(Jgranstrom) #9

Sure, this is what I use to proxy to a registry v2 container. Note 8080 is bound to 443.

upstream docker-registry-v2 {
  server registryv2:5000;

server {
  listen 8080;
  server_name localhost;

  ssl on;
  ssl_certificate /docker-registry.crt;
  ssl_certificate_key /docker-registry.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 (
  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;

    auth_basic "registry";
    auth_basic_user_file /docker-registry.htpasswd;

    ### Note: this is required:
    add_header 'Docker-Distribution-Api-Version' 'registry/2.0' always;

    proxy_pass                          http://docker-registry-v2;
    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;

(Alex Nederlof) #10

We also run it on HTTPS, and HTTP redirects to HTTPS. I tried adding the images as my.registry:443 which succeeded. But then it still could not find any tags (404) and even worse, now I cant remove that image anymore :confused:

(Jordancrawford) #11

Definetely no services using the image? I had it failing to delete but not actually telling me why.

(Cawaker) #12

I’m seeing something similar, docker cloud is failing to authenticate on redeployment.

it adds the images okay from my private registry, but any actions after that fail.

GET /v2/ HTTP/1.1" 401 87 "" "docker/1.9.1-cs2 go/go1.4.3 git-commit/4ade326 kernel/4.2.0-3 4-generic os/linux arch/amd64" time="2016-03-29T03:12:13Z" level=warning msg="error authorizing context: basic authentication challenge for realm \"Registry Realm\": i nvalid authorization credential" go.version=go1.5.3 3ce590ed http.request.method=GET http.request.remoteaddr="" http.request.uri="/v2/" http.request.useragent="docker/1.9.1 -cs2 go/go1.4.3 git-commit/4ade326 kernel/4.2.0-34-generic os/linux arch/amd64" version =v2.3.1

(Aleksei Lebedev) #13

I’ve got the same error (404 on tags) when I try to create service based on private Docker Hub repository.
There is no any problem with creating service based on images from public repository.

(Franciscocpg) #14

Same problem for me on private registry

(Jacob Parry) #15

This is also affecting me. I don’t even get the request from Docker Cloud, it isn’t my registry 404ing, it is the actual Docker Cloud UI.

This is 100% blocking a deployment of Docker-based services, so if this could be resolved that would prevent me from trying to investigate another service.

(Usowmyas) #16

is this fixed ? I’m using 1.11 and facing the same issue
Error: Status 404 trying to push repository test : “404 page not found\n”

it does not work for
docker push ( which is behind Nginx )

but works for
docker push localhost:443/test:latest

(ClementVidal) #17

Any news on this issue ?

I’m trying to use a third party image hosted on a internal registry.
In the docker cloud UI, i can import the image, but when i try to create a service using this image,
i get stuck with a loading spinner below the image field, trying to load tags …

Do you have the same issue ?

(Joseym) #18

I have the same issue. I’ve a ticket open with support but its been untouched for 17+ days now :confused:

(Jmiraglia) #19

I’ve also have an open ticket, and just got a response on 12/8 regarding this issue just acknowledging that they are looking into it further.

@cvidal I’m also using GitLab for my private repository, although I’m using a private GitLab server, not You can still deploy services, but you have to do so using a Stackfile, can’t use the WebUI to create services (or edit them).

(ClementVidal) #20

What do you mean by stockfile ? You mean a stack file ? Right ?