Make env in ImageConfig a map
Fields in CUE were renamed to the lowercase version of Dockerfile instructions. There's now opportunity to make other fields simpler to use (e.g., healthcheck), this commit is focused on env. Signed-off-by: Helder Correia <174525+helderco@users.noreply.github.com>
This commit is contained in:
@@ -56,14 +56,14 @@ func (c *pushTask) Run(ctx context.Context, pctx *plancontext.Context, s solver.
|
||||
}
|
||||
|
||||
// Decode the image config
|
||||
imageConfig := dockerfile2llb.ImageConfig{}
|
||||
imageConfig := ImageConfig{}
|
||||
if err := v.Lookup("config").Decode(&imageConfig); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Export image
|
||||
lg.Debug().Str("dest", dest.String()).Msg("export image")
|
||||
resp, err := s.Export(ctx, st, &dockerfile2llb.Image{Config: imageConfig}, bk.ExportEntry{
|
||||
resp, err := s.Export(ctx, st, &dockerfile2llb.Image{Config: imageConfig.ToSpec()}, bk.ExportEntry{
|
||||
Type: bk.ExporterImage,
|
||||
Attrs: map[string]string{
|
||||
"name": dest.String(),
|
||||
|
Reference in New Issue
Block a user