Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip docker save if docker daemon base image is cached #2049

Merged
merged 17 commits into from
Oct 16, 2019

Conversation

TadCordle
Copy link
Contributor

Review after #2044. Fixes #1912.

Speeds up docker:// base images by retrieving the layers/config from the cache before doing a docker save. The following timings are how long a second run of ./mvnw jib:dockerBuild takes on the master branch vs. with these changes:

docker://gcr.io/distroless/java

  • master: 3.8 seconds
  • this PR: 1.2 seconds

docker://openjdk:8

  • master: 8.8 seconds
  • this PR: 2.3 seconds

@TadCordle TadCordle changed the title Docker save cache Skip docker save if docker daemon base image is cached Oct 8, 2019
@TadCordle TadCordle requested a review from a team October 14, 2019 22:34
Copy link
Member

@chanseokoh chanseokoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps you can add a unit test for getCachedDockerImage after marking @VisibleForTesting?

jib-core/CHANGELOG.md Outdated Show resolved Hide resolved
@TadCordle TadCordle merged commit 4c0a324 into master Oct 16, 2019
@TadCordle TadCordle deleted the docker-save-cache branch October 16, 2019 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Optimize local base image support: cache compressed layers
3 participants