mirror of
https://github.com/docker/compose.git
synced 2025-07-23 21:54:40 +02:00
add support for DOCKER_DEFAULT_PLATFORM
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
parent
b2d2c67032
commit
ba08d39187
@ -261,6 +261,13 @@ func (s *composeService) toBuildOptions(project *types.Project, service types.Se
|
|||||||
}))
|
}))
|
||||||
|
|
||||||
var plats []specs.Platform
|
var plats []specs.Platform
|
||||||
|
if platform, ok := project.Environment["DOCKER_DEFAULT_PLATFORM"]; ok {
|
||||||
|
p, err := platforms.Parse(platform)
|
||||||
|
if err != nil {
|
||||||
|
return build.Options{}, err
|
||||||
|
}
|
||||||
|
plats = append(plats, p)
|
||||||
|
}
|
||||||
if service.Platform != "" {
|
if service.Platform != "" {
|
||||||
p, err := platforms.Parse(service.Platform)
|
p, err := platforms.Parse(service.Platform)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user