mirror of https://github.com/docker/compose.git
always use 'docker' export entry when building with 'up' or 'run' commands
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
This commit is contained in:
parent
e016faac33
commit
44c55e89c0
|
@ -168,16 +168,14 @@ func (s *composeService) getBuildOptions(project *types.Project, images map[stri
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if len(opt.Platforms) > 1 {
|
opt.Exports = []bclient.ExportEntry{{
|
||||||
opt.Exports = []bclient.ExportEntry{{
|
Type: "docker",
|
||||||
Type: "docker",
|
Attrs: map[string]string{
|
||||||
Attrs: map[string]string{
|
"load": "true",
|
||||||
"load": "true",
|
},
|
||||||
},
|
}}
|
||||||
}}
|
if opt.Platforms, err = useDockerDefaultPlatform(project, service.Build.Platforms); err != nil {
|
||||||
if opt.Platforms, err = useDockerDefaultPlatform(project, service.Build.Platforms); err != nil {
|
opt.Platforms = []specs.Platform{}
|
||||||
opt.Platforms = []specs.Platform{}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
opts[imageName] = opt
|
opts[imageName] = opt
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in New Issue