-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
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.