docker-registry-proxy icon indicating copy to clipboard operation
docker-registry-proxy copied to clipboard

Cache also pushes

Open mitar opened this issue 3 years ago • 1 comments

Inside our CI environment, we use Kaniko to build Docker images. Kaniko support caching by pushing Docker image layers to a Docker registry. We use docker-registry-proxy for Docker caching inside our CI environment. It works great for pulls, but ideally to optimize Kaniko builds, it would work better if when Kaniko pushes its cached layer to a Docker registry (through docker-registry-proxy), docker-registry-proxy would cache it, and then the next time Kaniko could access it immediately though docker-registry-proxy. Now, caching using docker-registry-proxy comes into the effect only the second time Kaniko needs the layer in some future build.

mitar avatar Mar 10 '21 08:03 mitar

This being an nginx caching proxy, there is no way we can cache anything during push without contorting it beyond useless.

Suggestion: something like https://docs.docker.com/registry/deploying/ for a real registry which stores layers that Kaniko calls "cache". it supports multiple storage backends, has some management, support etc

rpardini avatar Mar 16 '21 18:03 rpardini