3-tier implementation of manifest caching (#57)

* implement manifest caching; refactor config with includes, and generate from ENVs in entrypoint.sh
- disabled by default; enable with -e ENABLE_MANIFEST_CACHE=true
- default times and regexes are a wild guess, make sure to tune for your use case.
-  add manifest caching/anti-ratelimit usage note to README
- add -e ENABLE_MANIFEST_CACHE=true to examples, some wording changes
- add -e ENABLE_MANIFEST_CACHE=true to one the steps in test workflow.
This commit is contained in:
Ricardo Pardini
2020-10-30 18:54:10 +01:00
committed by GitHub
parent 227a397225
commit a726f88049
7 changed files with 138 additions and 47 deletions

View File

@@ -53,10 +53,10 @@ jobs:
cache-from: type=local,src=/tmp/.buildx-cache/release
# this only reads from the cache
- name: Start proxy instance in docker
- name: Start proxy instance in docker (ENABLE_MANIFEST_CACHE=false)
run: |
docker run -d --rm --name docker_registry_proxy \
-p 0.0.0.0:3128:3128 \
-p 0.0.0.0:3128:3128 -e ENABLE_MANIFEST_CACHE=false \
-v $(pwd)/docker_mirror_cache:/docker_mirror_cache \
-v $(pwd)/docker_mirror_certs:/ca \
sanity-check/docker-registry-proxy:latest
@@ -115,10 +115,10 @@ jobs:
run: |
sudo systemctl restart docker.service
- name: Start proxy instance in docker again
- name: Start proxy instance in docker again (ENABLE_MANIFEST_CACHE=true)
run: |
docker run -d --rm --name docker_registry_proxy \
-p 0.0.0.0:3128:3128 \
-p 0.0.0.0:3128:3128 -e ENABLE_MANIFEST_CACHE=true \
-v $(pwd)/docker_mirror_cache:/docker_mirror_cache \
-v $(pwd)/docker_mirror_certs:/ca \
sanity-check/docker-registry-proxy:latest