docker login not working with nexus 3 private registry

前端 未结 1 1573
余生分开走
余生分开走 2020-12-17 16:42

Nexus UI Config

I am running Nexus Repository Manager OSS 3.0.1-01 on a linux VM On that VM, I have nginx working to reserve proxy http requests as https. My SSL key

相关标签:
1条回答
  • 2020-12-17 17:20

    I had to add an additional (server) entry in my nginx config, right below the previous entry

    restart nginx

    docker client, will connect to port 6666, nginx will route the traffic to port 4444 which

    # correlates to your nexus http connector
    server {
        listen 6666;
        server_name box.company.net;
        keepalive_timeout 60;
        ssl on;
        ssl_certificate /etc/nginx/conf.d/net.crt;
        ssl_certificate_key /etc/nginx/conf.d/net.key;
        ssl_ciphers HIGH:!kEDH:!ADH:!MD5:@STRENGTH;
        ssl_session_cache shared:TLSSSL:16m;
        ssl_session_timeout 10m;
        ssl_prefer_server_ciphers on;
        client_max_body_size 1G;
        chunked_transfer_encoding on;
    
        location / {
    
          access_log              /var/log/nginx/docker.log;
          proxy_set_header        Host $http_host;
          proxy_set_header        X-Real-IP $remote_addr;
          proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
          proxy_set_header        X-Forwarded-Proto "https";
          proxy_pass              http://x.x.x.x:4444;
          proxy_read_timeout      90;
    
        }
    }
    

    then I could do

    docker login -u username -p password box.company.net:6666
    docker pull box.company.net:6666/docker-image:tag
    docker push box.company.net:6666/docker-image:tag
    
    0 讨论(0)
提交回复
热议问题