Skip to content
This repository has been archived by the owner on Mar 31, 2022. It is now read-only.

Add support for --cache-from parameter #217

Merged
merged 1 commit into from
Oct 1, 2018
Merged

Add support for --cache-from parameter #217

merged 1 commit into from
Oct 1, 2018

Conversation

martinberanek
Copy link

#202 please review my pull request

Copy link
Contributor

@davidxia davidxia left a comment

Choose a reason for hiding this comment

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

Thanks for this PR. Could you also update the usage docs here (add a row for cacheFrom in the "Build Phase")? https://github.com/spotify/dockerfile-maven/blob/master/docs/usage.md#build-phase

}
buildParameters.add(new DockerClient.BuildParam("cache-from", cacheFrom));
} catch (ImageNotFoundException e) {
log.warn("Imange for cache-from not found and will not be used for build");
Copy link
Contributor

Choose a reason for hiding this comment

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

typo in "Imange"

@martinberanek
Copy link
Author

Typo fixed and documentation added ;)

Copy link
Contributor

@davidxia davidxia left a comment

Choose a reason for hiding this comment

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

Thanks for the fixes.

I just noticed docker build --help says the following --cache-from strings Images to consider as cache sources. Notice the plural. I see that you can specify multiple --cache-from images like docker build -t test:latest --cache-from test:latest --cache-from test-builder:latest . Could you update the PR to accept multiple cache-froms? :)

@davidxia davidxia self-requested a review September 24, 2018 13:54
@martinberanek
Copy link
Author

I have added support for multiple cache-from images.

@davidxia davidxia merged commit 190726b into spotify:master Oct 1, 2018
@pbillen
Copy link

pbillen commented Oct 1, 2018

This is great. Thanks @martinberanek!

@martinberanek martinberanek deleted the cache-from branch October 1, 2018 16:19
@steven-sheehy
Copy link

The pull output is not formatted nicely. Guessing dockerClient.pull(image); should be dockerClient.pull(image, progressHandler); ?

}
}
if (!cacheFromExistLocally.isEmpty()) {
buildParameters.add(new DockerClient.BuildParam("cache-from",
Copy link

@seanwang-okta seanwang-okta Aug 30, 2019

Choose a reason for hiding this comment

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants