Skip to content

Commit

Permalink
Merge pull request #9862 from glours/use-docker-export-if-no-build-pl…
Browse files Browse the repository at this point in the history
…atforms

configure default builder export when no build.platforms defined
  • Loading branch information
glours authored Sep 22, 2022
2 parents 94465d5 + 71ab6c9 commit e2a3fe9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/compose/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ func (s *composeService) build(ctx context.Context, project *types.Project, opti
Attrs: map[string]string{"ref": image},
})
}
buildOptions.Exports = []bclient.ExportEntry{{
Type: "docker",
Attrs: map[string]string{
"load": "true",
},
}}
if len(buildOptions.Platforms) > 1 {
buildOptions.Exports = []bclient.ExportEntry{{
Type: "image",
Expand Down

0 comments on commit e2a3fe9

Please sign in to comment.