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

load_cache or similar support #121

Closed
matiasanaya opened this issue Jun 8, 2017 · 4 comments
Closed

load_cache or similar support #121

matiasanaya opened this issue Jun 8, 2017 · 4 comments

Comments

@matiasanaya
Copy link

matiasanaya commented Jun 8, 2017

I want to know if it's possible to use a get resource instead of pulling down the image when cache: true is set for building.

Say this is my current job (which has the nice benefit that the FROM image can be cached by concourse):

- get: repo
- get: a-cached-docker-image-from
  params: { save: true }
- put: a-docker-image
      get_params: { skip_download: true }
      params:
        build: repo
        cache: true
        cache_tag: a-cached-tag
        load_base: a-cached-docker-image-from

I'd like for something like the following to work equivalently (where the cache image can be cached by concourse):

- get: repo
- get: a-cached-docker-image
  params: { save: true }
- get: a-cached-docker-image-from
  params: { save: true }
- put: a-docker-image
      get_params: { skip_download: true }
      params:
        build: repo
        load_cache: a-cached-docker-image # this does not exist
        load_base: a-cached-docker-image-from
@matiasanaya matiasanaya changed the title load_cache or similar support load_cache or similar support Jun 8, 2017
@jtarchie
Copy link
Contributor

I'm pretty confused. What would the difference in load_base and load_cache? Wouldn't they just both be loading the layers from an image? Why do you need both?

@matiasanaya
Copy link
Author

@jtarchie did I get it wrong? The way I understand it load_base will be used as the FROM ... image while cache: true is using a resulting image in hopes it can re-use a layer. load_cache would basically allow for those layers to be populated. Maybe a solution with only one attribute which takes an array would do. i.e.

load_layers:
  - a-cached-docker-image
  - a-cached-docker-image-from

@jtarchie
Copy link
Contributor

No, I just don't understand docker that well. There are too many layers to it. :trollface:

Thanks for the explanation. I think there might be a way to do what you are requesting. I believe others have done it.

@matiasanaya
Copy link
Author

matiasanaya commented Mar 31, 2019

Fixed by #188

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

No branches or pull requests

3 participants