Skip to content

Multistage Docker Build Cache #3831

Open
@no1melman

Description

Is the only way to support multistage docker build cache like discussed here to have separate docker builds in the skaffold build section like below (below being the skaffold rep of what is in that link):

build:
  artifacts:
    - image: itamarst/helloworld:compile-stage
      context: .
      docker:
        target: compile-image
        cacheFrom: 
          - itamarst/helloworld:compile-stage
    - image: itamarst/helloworld:latest
      context: .
      docker:
        target: runtime-image
        cacheFrom:
          - itamarst/helloworld:compile-stage
          - itamarst/helloworld:latest

There is no "auto" feature that scans your dockerfile first and caches necessary stages...

This seems bad to me for the reasons of tagging... if you have multiple CD pipelines running, they can't all read and write to helloworld:compile-stage, but if we left it up to the tag policy, how do you get that injected into the runtime-image stage

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions