question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Skip downloading and caching base image layers (BLOb) if target registry already has them

See original GitHub issue

For 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:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
chanseokohcommented, Jul 31, 2019

@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.

1reaction
loosebazookacommented, May 3, 2019

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Optimizing builds with cache management
The only way to force a rebuild is by making sure that a layer before it has changed, or by clearing the build...
Read more >
Fast Docker Builds With Caching (Not Only) For Python
Everybody knows about Docker layers and caching — unless the inputs of an image layer change, Docker can reuse locally cached layers. Just...
Read more >
Build Containers the Hard Way - GitBook
Docker has its own caching mechanism that helps Dockerfile-based builds run faster. Essentially, Docker caches the container image generated after each ...
Read more >
10 best practices to containerize Node.js web applications ...
Keeping unnecessary files out of your Node.js Docker images; Mounting secrets into the Docker build image. 1. Use explicit and deterministic ...
Read more >
Maven docker cache dependencies - Stack Overflow
Usually, there's no change in pom.xml file but just some other source code changes when you're attempting to start docker image build.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found