Skip downloading and caching base image layers (BLOb) if target registry already has them
See original GitHub issueFor registry push (jib:build
), I wonder if we can entirely skip downloading the base image (layer tarballs) by checking ahead if the target repository has all the layers. I think in most cases, the target repository will have the base image. Even if it doesn’t, it will have them available as soon as Jib or anyone pushes the base image or any images based on it. Java base images are often very large, and I think this will particularly helpful on CI/CD environment, where people don’t persist the Jib base image cache ($HOME/.cache/google-cloud-tools-java/jib
on Linux, for example).
Similarly, we may also be able to skip downloading the base image for Docker daemon push, if we could check if the daemon has some layer. However, it seems the Docker engine API does not support checking BLOb existence.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:7 (4 by maintainers)
Top GitHub Comments
@hybnew Jib does cache base images. This issue is about potentially skipping downloading and caching the base image layer BLObs entirely if Jib can be certain that the destination repository already has the BLObs.
We gotta be careful when implementing this to make sure this message still makes sense: https://github.com/GoogleContainerTools/jib/pull/1687/files#diff-455581b85be6f9470c42604cc1dcdb3dR89