Skip to content

Add export to Gateway API #1914

@vladaionescu

Description

@vladaionescu

I'd like to be able to perform an export of an image tar in the middle of the build, and then use that tar in subsequent LLB operations. The image tar doesn't need to be streamed to the client - it just needs to be available to be llb.Copy'd or mounted in llb.Run commands.

Use-case

For docker-in-buildkit: construct an image that is then used in a docker run command that executes within the build.

Workaround

Use separate consecutive solves. This has the disadvantage that it is usually slow at scale (noticeable at 3+ images) if done sequentially. Parallel may be possible, but makes the client code very complicated often.


Happy to take a look into implementing this myself, if this turns out to be not extremely complicated. Could use architectural guidance as I believe @tonistiigi has done previous thinking to this end.

CC @tiborvass @hinshun @shykes

Metadata

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