Docker Hub's rate limits are so low now that they've started to affect my home lab. Deploying a caching proxy and directing all pull requests through it should prevent exceeding the limit. It will also help prevent containers from starting if access to the Internet is down, as long as their images have been cached recently.
18 lines
478 B
Plaintext
18 lines
478 B
Plaintext
# vim: set ft=nginx.conf :
|
|
location /v2/ {
|
|
proxy_pass https://registry-1.docker.io;
|
|
|
|
proxy_set_header Host registry-1.docker.io;
|
|
proxy_ssl_server_name on;
|
|
|
|
proxy_cache docker_cache;
|
|
proxy_cache_valid 200 302 60m;
|
|
proxy_cache_valid 404 10m;
|
|
proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504 http_429;
|
|
proxy_buffers 8 16k;
|
|
proxy_buffer_size 32k;
|
|
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Connection "";
|
|
}
|