Skip to content

Commit 955f289

Browse files
committed
Pass cache imports from solve ptions to solve request
Signed-off-by: Ignas Mikalajunas <[email protected]>
1 parent 5b5afdb commit 955f289

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

cmd/buildctl/build.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import (
1616
"github.com/moby/buildkit/client/llb"
1717
"github.com/moby/buildkit/cmd/buildctl/build"
1818
bccommon "github.com/moby/buildkit/cmd/buildctl/common"
19+
"github.com/moby/buildkit/frontend"
1920
gateway "github.com/moby/buildkit/frontend/gateway/client"
2021
"github.com/moby/buildkit/identity"
2122
"github.com/moby/buildkit/session"
@@ -363,6 +364,15 @@ func buildAction(clicontext *cli.Context) error {
363364
Frontend: solveOpt.Frontend,
364365
FrontendOpt: solveOpt.FrontendAttrs,
365366
}
367+
368+
sreq.CacheImports = make([]frontend.CacheOptionsEntry, len(solveOpt.CacheImports))
369+
for i, e := range solveOpt.CacheImports {
370+
sreq.CacheImports[i] = frontend.CacheOptionsEntry{
371+
Type: e.Type,
372+
Attrs: e.Attrs,
373+
}
374+
}
375+
366376
if def != nil {
367377
sreq.Definition = def.ToPB()
368378
}

0 commit comments

Comments
 (0)