Docker registry

This commit is contained in:
tanshu committed 2024-12-17 17:53:30 +05:30
1 parent 2f767a1826
commit f04a29b5c7
7 files changed
+131

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
server {
listen 80;
server_name {{ http_host }};
# set max upload size
client_max_body_size 10G;
location / {
# Do not allow connections from docker 1.5 and earlier
# docker pre-1.6.0 did not properly set the user agent on ping, catch "Go *" user agents
if ($http_user_agent ~ "^(docker\/1\.(3|4|5(?!\.[0-9]-dev))|Go ).*$" ) {
return 404;
}
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Real-IP $remote_addr; # pass on real client's IP
add_header X-Robots-Tag "noindex, nofollow, nosnippet, noarchive" always;
add_header Strict-Transport-Security "max-age=15552000; includeSubDomains" always;
proxy_read_timeout 900;
proxy_pass http://localhost:{{ host_port }};
}
}