summaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-03-23 13:15:47 +0100
committerGitHub <noreply@github.com>2022-03-23 13:15:47 +0100
commita8743d3327b9a97ea812632885492d95c816d79a (patch)
treea484397dcb515c20e1e6c62fe7a08510794e1581 /cmd/podman
parent9d8972e0ee665325a2519eb168423d773856d563 (diff)
parenteedce31eb4aa8c0678c24cdf907ebd971ce02233 (diff)
downloadpodman-a8743d3327b9a97ea812632885492d95c816d79a.tar.gz
podman-a8743d3327b9a97ea812632885492d95c816d79a.tar.bz2
podman-a8743d3327b9a97ea812632885492d95c816d79a.zip
Merge pull request #13588 from flouthoc/import-os-arch
import: allow users to set `--os`, `--arch` and `--variant` of image imports
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/images/import.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/cmd/podman/images/import.go b/cmd/podman/images/import.go
index a7416e298..47f2a798d 100644
--- a/cmd/podman/images/import.go
+++ b/cmd/podman/images/import.go
@@ -76,6 +76,18 @@ func importFlags(cmd *cobra.Command) {
flags.StringVarP(&importOpts.Message, messageFlagName, "m", "", "Set commit message for imported image")
_ = cmd.RegisterFlagCompletionFunc(messageFlagName, completion.AutocompleteNone)
+ osFlagName := "os"
+ flags.StringVar(&importOpts.OS, osFlagName, "", "Set the OS of the imported image")
+ _ = cmd.RegisterFlagCompletionFunc(osFlagName, completion.AutocompleteNone)
+
+ archFlagName := "arch"
+ flags.StringVar(&importOpts.Architecture, archFlagName, "", "Set the architecture of the imported image")
+ _ = cmd.RegisterFlagCompletionFunc(archFlagName, completion.AutocompleteNone)
+
+ variantFlagName := "variant"
+ flags.StringVar(&importOpts.Variant, variantFlagName, "", "Set the variant of the imported image")
+ _ = cmd.RegisterFlagCompletionFunc(variantFlagName, completion.AutocompleteNone)
+
flags.BoolVarP(&importOpts.Quiet, "quiet", "q", false, "Suppress output")
if !registry.IsRemote() {
flags.StringVar(&importOpts.SignaturePolicy, "signature-policy", "", "Path to a signature-policy file")