-
Notifications
You must be signed in to change notification settings - Fork 407
/
workflow-reg-proxy.conf
37 lines (31 loc) · 1.28 KB
/
workflow-reg-proxy.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
server {
listen 443 ssl;
server_name localhost;
ssl on;
ssl_certificate /var/registry/certs/cert.pem;
ssl_certificate_key /var/registry/certs/key.pem;
ssl_verify_client off;
proxy_set_header Host $http_host; # required for Docker client
proxy_set_header X-Real-IP $remote_addr; # pass client IP
proxy_set_header Authorization ""; # see https://github.com/dotcloud/docker-registry/issues/170
proxy_read_timeout 900;
proxy_set_header X-Forwarded-Proto "https";
proxy_set_header X-Forwarded-Protocol "https";
client_max_body_size 0; # disable any limits to avoid HTTP 413 for large image uploads
# required to avoid HTTP 411: see Issue #1486 (https://github.com/dotcloud/docker/issues/1486)
chunked_transfer_encoding on;
location / {
# let Nginx know about our auth file
auth_basic "Restricted Docker Registry";
auth_basic_user_file /var/registry/certs/docker-registry.htpasswd;
proxy_pass http://registry:5000/;
}
location /_ping {
auth_basic off;
proxy_pass http://registry:5000/;
}
location /v1/_ping {
auth_basic off;
proxy_pass http://registry:5000/;
}
}