Skip to content

Commit

Permalink
buildctl: allow import-cache on frontend builds
Browse files Browse the repository at this point in the history
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
  • Loading branch information
tonistiigi committed Nov 21, 2018
1 parent bf8c057 commit 478f417
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/buildctl/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,10 @@ func build(clicontext *cli.Context) error {
solveOpt.FrontendAttrs["no-cache"] = ""
}

if clicontext.String("frontend") != "" && len(clicontext.StringSlice("import-cache")) != 0 {
solveOpt.FrontendAttrs["cache-from"] = strings.Join(clicontext.StringSlice("import-cache"), ",")
}

eg.Go(func() error {
resp, err := c.Solve(ctx, def, solveOpt, ch)
if err != nil {
Expand Down

0 comments on commit 478f417

Please sign in to comment.