diff --git a/bake/compose.go b/bake/compose.go index 990fcee10d7..8c4e5fe45b1 100644 --- a/bake/compose.go +++ b/bake/compose.go @@ -78,6 +78,7 @@ func ParseCompose(cfgs []compose.ConfigFile, envs map[string]string) (*Config, e // compose does not support nil values for labels labels := map[string]*string{} for k, v := range s.Build.Labels { + v := v labels[k] = &v } diff --git a/bake/remote.go b/bake/remote.go index 802e9209451..939957d0353 100644 --- a/bake/remote.go +++ b/bake/remote.go @@ -34,9 +34,9 @@ func ReadRemoteFiles(ctx context.Context, nodes []builder.Node, url string, name var files []File var node *builder.Node - for _, n := range nodes { + for i, n := range nodes { if n.Err == nil { - node = &n + node = &nodes[i] continue } }