Docker push nexus private repo fail, 413 Request Entity Too Large

Viewed 6665

I've deployed an on prem instance of Nexus OSS, that is reached behind a Nginx reverse proxy.

On any attempt to push docker images to a repo created on the Nexus registry I'm bumping into a 413 Request Entity Too Large in the middle of the push.

The nginx.conf file is looking like so:

http {
    client_max_body_size 0;
    upstream nexus_docker {
        server nexus:1800;
    } 
    server {
        server_name nexus.services.loc;
        location / {
            proxy_pass http://nexus_docker/;
            proxy_set_header Host $http_post;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        } 
    } 
} 

The nginx is deployed using docker, and I've successfully logged in to it using docker login. I've tried multiple other flags, such as the chunkin and such. But nothing seems to work.

2 Answers

As it turns out, the linux distro running the containered nginx server was itself running a variation of nginx for any incoming request.

Once we set the client_max_body_size to 0 on the nginx configuration file which the OS ran, it worked.

Related