Skip to content

Commit

Permalink
Merge pull request #1985 from cpuguy83/dockerfile_multiplat_opt
Browse files Browse the repository at this point in the history
Support BUILDKIT_MULTI_PLATFORM arg in Dockerfile
  • Loading branch information
tonistiigi authored Feb 18, 2021
2 parents 7f26b05 + adf8f25 commit 25bd56b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions frontend/dockerfile/builder/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ const (
keyContextSubDir = "contextsubdir"
keyContextKeepGitDir = "build-arg:BUILDKIT_CONTEXT_KEEP_GIT_DIR"
keySyntax = "build-arg:BUILDKIT_SYNTAX"
keyMultiPlatformArg = "build-arg:BUILDKIT_MULTI_PLATFORM"
keyHostname = "hostname"
)

Expand Down Expand Up @@ -369,6 +370,9 @@ func Build(ctx context.Context, c client.Client) (*client.Result, error) {

exportMap := len(targetPlatforms) > 1

if v := opts[keyMultiPlatformArg]; v != "" {
opts[keyMultiPlatform] = v
}
if v := opts[keyMultiPlatform]; v != "" {
b, err := strconv.ParseBool(v)
if err != nil {
Expand Down

0 comments on commit 25bd56b

Please sign in to comment.