mirror of
https://github.com/moby/buildkit.git
synced 2026-08-04 23:00:51 +00:00
Merge pull request #1985 from cpuguy83/dockerfile_multiplat_opt
Support BUILDKIT_MULTI_PLATFORM arg in Dockerfile
This commit is contained in:
@@ -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"
|
||||
)
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user