rpardini / docker-registry-proxy

An HTTPS Proxy for Docker providing centralized configuration and caching of any registry (quay.io, DockerHub, k8s.gcr.io)
Apache License 2.0
912 stars 170 forks source link

Feature/configure blob caching #105

Open hishamanver opened 3 years ago

hishamanver commented 3 years ago

This PR implements the following:

What:

  1. Enable configuration of 'proxy_cache_valid' age with CACHE_VALIDITY_PERIOD var (defaults to 60d)
  2. Enable configuration of 'proxy_cache_path' 'inactive' setting with CACHE_MAX_AGE var (defaults to 60d)
  3. Allows serving from STALE cache for non-manifest layers (eg: blob) when upstream is not available (e.g. connectivity issues / airgapped solution)

Why:

  1. We want to be able to pull images and cache them for variable periods of time (e.g. forever).
  2. We want to limit the impact of upstream outages by always allowing serving of STALE content if there are upstream issues

Comments welcome

Happy to update readme post discussion

hishamanver commented 3 years ago

includes changes from #107