summaryrefslogtreecommitdiff
path: root/cmd/podman/common
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-12-01 21:48:40 +0100
committerGitHub <noreply@github.com>2020-12-01 21:48:40 +0100
commite3313fdd50057ee86551c535252a4dbed82d6516 (patch)
treeb9a22bf73bc9bd95df6e483fe354ec8250dba5c8 /cmd/podman/common
parentb7ff6f09121eee8a0444baede9f6c84cc1f12b71 (diff)
parent88f8d96ed8e7edcb4dfdb3de707034036bab27ff (diff)
downloadpodman-e3313fdd50057ee86551c535252a4dbed82d6516.tar.gz
podman-e3313fdd50057ee86551c535252a4dbed82d6516.tar.bz2
podman-e3313fdd50057ee86551c535252a4dbed82d6516.zip
Merge pull request #8488 from rhatdan/platform
Add support for --platform
Diffstat (limited to 'cmd/podman/common')
-rw-r--r--cmd/podman/common/create.go8
-rw-r--r--cmd/podman/common/create_opts.go1
2 files changed, 9 insertions, 0 deletions
diff --git a/cmd/podman/common/create.go b/cmd/podman/common/create.go
index 599b430ea..14086ace4 100644
--- a/cmd/podman/common/create.go
+++ b/cmd/podman/common/create.go
@@ -513,6 +513,14 @@ func DefineCreateFlags(cmd *cobra.Command, cf *ContainerCLIOpts) {
)
_ = cmd.RegisterFlagCompletionFunc(pidsLimitFlagName, completion.AutocompleteNone)
+ platformFlagName := "platform"
+ createFlags.StringVar(
+ &cf.Platform,
+ platformFlagName, "",
+ "Specify the platform for selecting the image. (Conflicts with override-arch and override-os)",
+ )
+ _ = cmd.RegisterFlagCompletionFunc(platformFlagName, completion.AutocompleteNone)
+
podFlagName := "pod"
createFlags.StringVar(
&cf.Pod,
diff --git a/cmd/podman/common/create_opts.go b/cmd/podman/common/create_opts.go
index 41611d1aa..af53a3b67 100644
--- a/cmd/podman/common/create_opts.go
+++ b/cmd/podman/common/create_opts.go
@@ -78,6 +78,7 @@ type ContainerCLIOpts struct {
OverrideVariant string
PID string
PIDsLimit *int64
+ Platform string
Pod string
PodIDFile string
PreserveFDs uint