Logging into docker returns 404 for artifactory

I have the following nginx configuration for docker repository in artfactory

server { listen 2222 ssl; server_name rproxy.company.com; if ($http_x_forwarded_proto = '') { set $http_x_forwarded_proto $scheme; } rewrite ^/(v1|v2)/(.*) /artifactory/api/docker/docker-dev/$1/$2; client_max_body_size 0; chunked_transfer_encoding on; location / { allow all; proxy_read_timeout 900; proxy_pass_header Server; proxy_cookie_path ~*^/.* /; proxy_set_header X-Artifactory-Override-Base-Url $http_x_forwarded_proto://$host:$server_port; proxy_set_header X-Forwarded-Port $server_port; proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto; proxy_set_header Host $http_host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass http://artifactory_lb; } 

But logging into docker rproxy.compan.com:2222 returns 404

Here is the access log for this request

"GET / api / docker / docker -dev / v2 / token? Account = myUsre & client_id = docker & offline_token = true & service = rproxy.company.com% 3A2222 HTTP / 1.1" 404 473 "-" "docker / 1.11.0 go / go1.5.4 git -commit / 4dc5990 kernel / 3.13.0-24-generic os / linux arch / amd64 UpstreamClient (Docker-Client / 1.11.0 \ x5C (linux \ x5C)) "

The curl -umyUser:myPass "https://rproxy.company.com:2222/v2/auth" returns the correct authentication token

I am also on Docker version 1.11 and Artifactory version 4.60. Any indications that I might lose?

Do I need to configure a reverse proxy from the web interface for docker repositories?

+6
source share
1 answer

I got the same error because I forgot to populate the advanced settings of the Docker repository before I generated the Nginx configuration.

Regeneration of the configuration and restart helped me solve.

0
source

All Articles