diff options
author | Nalin Dahyabhai <nalin@redhat.com> | 2021-09-14 11:52:51 -0400 |
---|---|---|
committer | Nalin Dahyabhai <nalin@redhat.com> | 2021-09-14 17:09:06 -0400 |
commit | 5dbf3ee7aeef6e2aca5512b3ad8684610080d421 (patch) | |
tree | aa4785ac69c811e767ddfcdb394925a572f20d34 /cmd/podman | |
parent | 6a34045c670b3f0184b4ba88faeb11bb4a58c747 (diff) | |
download | podman-5dbf3ee7aeef6e2aca5512b3ad8684610080d421.tar.gz podman-5dbf3ee7aeef6e2aca5512b3ad8684610080d421.tar.bz2 podman-5dbf3ee7aeef6e2aca5512b3ad8684610080d421.zip |
build: take advantage of --platform lists
The builder can take a list of platforms in the Platforms field of its
BuildOptions argument, and we should definitely take advantage of that.
The `bud-multiple-platform-values` test from buildah exercises support
for this, so
[NO TESTS NEEDED]
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Diffstat (limited to 'cmd/podman')
-rw-r--r-- | cmd/podman/images/build.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/cmd/podman/images/build.go b/cmd/podman/images/build.go index a1a28b809..31d014dfe 100644 --- a/cmd/podman/images/build.go +++ b/cmd/podman/images/build.go @@ -476,7 +476,7 @@ func buildFlagsWrapperToOptions(c *cobra.Command, contextDir string, flags *buil runtimeFlags = append(runtimeFlags, "--systemd-cgroup") } - imageOS, arch, err := parse.PlatformFromOptions(c) + platforms, err := parse.PlatformsFromOptions(c) if err != nil { return nil, err } @@ -490,7 +490,6 @@ func buildFlagsWrapperToOptions(c *cobra.Command, contextDir string, flags *buil AddCapabilities: flags.CapAdd, AdditionalTags: tags, Annotations: flags.Annotation, - Architecture: arch, Args: args, BlobDirectory: flags.BlobCache, CNIConfigDir: flags.CNIConfigDir, @@ -516,11 +515,11 @@ func buildFlagsWrapperToOptions(c *cobra.Command, contextDir string, flags *buil MaxPullPushRetries: 3, NamespaceOptions: nsValues, NoCache: flags.NoCache, - OS: imageOS, OciDecryptConfig: decConfig, Out: stdout, Output: output, OutputFormat: format, + Platforms: platforms, PullPolicy: pullPolicy, PullPushRetryDelay: 2 * time.Second, Quiet: flags.Quiet, |