Artifactory based docker registry showing 404 error

Viewed 38

I am trying to setup my first Artifactory based docker registry and I am hitting wall one after another.

So, my artifactory installation is docker-compose based and running on a Ubuntu 20.04.4 LTS VM (c36l83serv01.simnetaus.local). Here is a view of my docker and postgres running:

docker ps

Docker is running on local network 192.168.0.168

I have another VM (c36l83linr01.simnetaus.local) which is hosting nginx (install using apt) nginx version 1.18.0

here is my nginx reverse proxy setting, which was copied from Artifactory generated stub:

###########################################################
## this configuration was generated by JFrog Artifactory ##
###########################################################

## server configuration
server {
    
    listen 80 ;
    
    server_name c36l83linr01.simnetaus.local;
    if ($http_x_forwarded_proto = '') {
        set $http_x_forwarded_proto  $scheme;
    }
    ## Application specific logs
    ## access_log /var/log/nginx/c36l83linr01.simnetaus.local-access.log timing;
    ## error_log /var/log/nginx/c36l83linr01.simnetaus.local-error.log;
    rewrite ^/$ /ui/ redirect;
    rewrite ^/ui$ /ui/ redirect;
    chunked_transfer_encoding on;
    client_max_body_size 0;
    location / {
    proxy_read_timeout  2400s;
    proxy_pass_header   Server;
    proxy_cookie_path   ~*^/.* /;
    proxy_buffer_size 128k;
    proxy_buffers 40 128k;
    proxy_busy_buffers_size 128k;
    proxy_pass          http://c36l83serv01.simnetaus.local:8082;
    proxy_set_header    X-JFrog-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;
    add_header X-Content-Type-Options "nosniff" always;

        location ~ ^/artifactory/ {
            proxy_pass    http://c36l83serv01.simnetaus.local:8081;
        }
    }
}

My artifactory is configured for nginx as well:

enter image description here

enter image description here

I have created docker-local, docker-remote and docker (virtual) repository;

enter image description here

I could login to the registry from my windows command line:

enter image description here

However it won't allow me to push: enter image description here

If I use port in the url as suggested the repo settings, I get following error:

enter image description here

Anyone have any clue? WHat am I doing wrong? Any suggestion or help would be highly appreciated.

Thanks.

1 Answers

I think you should skip the /artifactory context in your docker pull and push. 404 error is basically from Nginx and not from Artifactory. As you were able to successfully login, try the below to pull,

docker push c333333.server.name/docker-repo-name/image-name:tag

Related