Skip to content

Commit

Permalink
always use 'docker' export entry when building with 'up' or 'run' com…
Browse files Browse the repository at this point in the history
…mands

Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
  • Loading branch information
glours committed Sep 2, 2022
1 parent 23c9aa6 commit 43169d5
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions pkg/compose/build.go
Expand Up @@ -168,16 +168,14 @@ func (s *composeService) getBuildOptions(project *types.Project, images map[stri
if err != nil {
return nil, err
}
if len(opt.Platforms) > 1 {
opt.Exports = []bclient.ExportEntry{{
Type: "docker",
Attrs: map[string]string{
"load": "true",
},
}}
if opt.Platforms, err = useDockerDefaultPlatform(project, service.Build.Platforms); err != nil {
opt.Platforms = []specs.Platform{}
}
opt.Exports = []bclient.ExportEntry{{
Type: "docker",
Attrs: map[string]string{
"load": "true",
},
}}
if opt.Platforms, err = useDockerDefaultPlatform(project, service.Build.Platforms); err != nil {
opt.Platforms = []specs.Platform{}
}
opts[imageName] = opt
continue
Expand Down

0 comments on commit 43169d5

Please sign in to comment.