Force another solve, so that the LLB created by the

dockerfile.v0 frontend actually runs, as we expect it to.

Also, enforce Evaluate: true on SolveRequests that run through the Solver

Signed-off-by: Joel Longtine <joel@dagger.io>
This commit is contained in:
Joel Longtine
2022-01-06 15:34:19 -07:00
parent 1c06504bde
commit 6e28c0505f
2 changed files with 14 additions and 1 deletions

View File

@@ -115,6 +115,18 @@ func (t *buildTask) dockerfile(ctx context.Context, pctx *plancontext.Context, s
return nil, err
}
st, err := ref.ToState()
if err != nil {
return nil, err
}
solvedRef, err := s.Solve(ctx, st, pctx.Platform.Get())
if err != nil {
return nil, err
}
// Image metadata
meta, ok := res.Metadata[exptypes.ExporterImageConfigKey]
if !ok {
@@ -126,7 +138,7 @@ func (t *buildTask) dockerfile(ctx context.Context, pctx *plancontext.Context, s
}
return compiler.NewValue().FillFields(map[string]interface{}{
"output": pctx.FS.New(ref).MarshalCUE(),
"output": pctx.FS.New(solvedRef).MarshalCUE(),
"config": image.Config,
})
}