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

Add support for cachefrom #1132

Closed
llowrey opened this issue Dec 1, 2018 · 4 comments · Fixed by #1139
Closed

Add support for cachefrom #1132

llowrey opened this issue Dec 1, 2018 · 4 comments · Fixed by #1139

Comments

@llowrey
Copy link
Contributor

llowrey commented Dec 1, 2018

Adding support for cachefrom should improve build time when running in a CI DinD environment. This field is supported as of API v1.25.

The POM configuration block should take a list of image names, possibly as one comma delimited string. The cachefrom field would then be added to the build request as a JSON array of strings.

Ideally, the build process would pull each image before submitting the image build request.

@pbillen
Copy link

pbillen commented Dec 1, 2018

+1 for this

Typical usage of this flag can be found on spotify/dockerfile-maven#202 (comment).

@rhuss
Copy link
Collaborator

rhuss commented Dec 12, 2018

I agree that this makes much sense. Anyone fancy to add this ? Shouldn't be hard and I could help in ramp up.

@llowrey
Copy link
Contributor Author

llowrey commented Dec 12, 2018

I'm not sure this is testable. IMO the only way to verify this is to inspect the JSON URL and query args sent to docker but I don't see a way to do that. Do you have a way to capture the JSON URL and args?

@llowrey
Copy link
Contributor Author

llowrey commented Dec 12, 2018

I made an attempt at implementing this feature (PR #1139). I can see (in docker.log) that the cachefrom arg is being passed and the api version is now v1.25 instead of v1.24 but I can't tell if docker is actually acting on it. Any ideas for how to verify that it's actually working?

rhuss pushed a commit that referenced this issue Apr 21, 2019
Fixes #1132 :This is my initial attempt. I'm not sure how to test it so this effort is incomplete. This PR relates to issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants