Skip to content

Commit 4c155db

Browse files
Merge pull request #438 from depot/pedro/dep-3651-load-true-fails-with-unknown-operating-system-or
fix: skip "dynamic" build platform when setting Docker pull platform
2 parents febc40d + 7e7355e commit 4c155db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/load/cli.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ func WithDepotImagePull(buildOpts map[string]build.Options, loadOpts DepotLoadOp
8484
if len(platforms) == 1 {
8585
platform := platforms[0]
8686
pullOpt.Platform = &platform
87-
} else if len(platforms) == 0 && loadOpts.BuildPlatform != "" {
87+
} else if len(platforms) == 0 && loadOpts.BuildPlatform != "" && loadOpts.BuildPlatform != "dynamic" {
8888
// When --build-platform is specified but platforms is not set in the
8989
// compose file, use the build platform so Docker pulls the correct
9090
// architecture instead of defaulting to the host architecture.

0 commit comments

Comments
 (0)