Skip to content

Instantly share code, notes, and snippets.

@rca
Created July 10, 2013 09:11
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save rca/5964754 to your computer and use it in GitHub Desktop.
Save rca/5964754 to your computer and use it in GitHub Desktop.
nginx config for docker registry. The key setting is `client_max_body_size 600M;` which allows large uploads. The setting `proxy_read_timeout 900;` gives the upload enough time to complete (but this might not be needed).
upstream docker_registry {
server 127.0.0.1:15000;
}
server {
listen 443;
root /dev/null;
index index.html index.htm;
server_name localhost.localdomain;
server_name registry.baremetal.io;
ssl on;
ssl_certificate /etc/ssl/baremetal/registry.baremetal.io.crt.pem;
ssl_certificate_key /etc/ssl/baremetal/registry.baremetal.io.key.pem;
client_max_body_size 600M;
gzip on;
gzip_min_length 1000;
gzip_proxied expired no-cache no-store private auth;
gzip_types application/json application/xml text/plain text/html;
location / {
proxy_pass http://docker_registry;
proxy_set_header Host $http_host;
proxy_read_timeout 900;
}
}
@joshk0
Copy link

joshk0 commented Aug 11, 2014

Thanks, the proxy_read_timeout 900 was extremely helpful for me. Have you considered submitting a documentation / example nginx.conf pull request to the docker_registry guys?

@aforty
Copy link

aforty commented Mar 22, 2016

Helpful still today, took me a while to figure out what was going on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment