summaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-08-28 16:02:56 -0400
committerGitHub <noreply@github.com>2020-08-28 16:02:56 -0400
commit97780a110b58a3bcc983bff75f3665768271631c (patch)
treeba803042c50a294dd6bc1d6f3d75f1a2be5619a5 /cmd/podman
parentc069e0bad9f4aa8da98c46d702f450ce41da6346 (diff)
parent3c6603a2f88ab5ba38bf58334417aaa90c458c06 (diff)
downloadpodman-97780a110b58a3bcc983bff75f3665768271631c.tar.gz
podman-97780a110b58a3bcc983bff75f3665768271631c.tar.bz2
podman-97780a110b58a3bcc983bff75f3665768271631c.zip
Merge pull request #7436 from rhatdan/variant
Add support for image pull overrides
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/common/create.go7
-rw-r--r--cmd/podman/common/create_opts.go1
-rw-r--r--cmd/podman/containers/create.go12
-rw-r--r--cmd/podman/containers/run.go3
-rw-r--r--cmd/podman/images/pull.go1
5 files changed, 12 insertions, 12 deletions
diff --git a/cmd/podman/common/create.go b/cmd/podman/common/create.go
index d0bc8d466..2b6f9348e 100644
--- a/cmd/podman/common/create.go
+++ b/cmd/podman/common/create.go
@@ -323,13 +323,16 @@ func GetCreateFlags(cf *ContainerCLIOpts) *pflag.FlagSet {
"override-arch", "",
"use `ARCH` instead of the architecture of the machine for choosing images",
)
- // markFlagHidden(createFlags, "override-arch")
createFlags.StringVar(
&cf.OverrideOS,
"override-os", "",
"use `OS` instead of the running OS for choosing images",
)
- // markFlagHidden(createFlags, "override-os")
+ createFlags.StringVar(
+ &cf.OverrideVariant,
+ "override-variant", "",
+ "Use _VARIANT_ instead of the running architecture variant for choosing images",
+ )
createFlags.String(
"pid", "",
"PID namespace to use",
diff --git a/cmd/podman/common/create_opts.go b/cmd/podman/common/create_opts.go
index 16d41988f..1b0e64590 100644
--- a/cmd/podman/common/create_opts.go
+++ b/cmd/podman/common/create_opts.go
@@ -65,6 +65,7 @@ type ContainerCLIOpts struct {
OOMScoreAdj int
OverrideArch string
OverrideOS string
+ OverrideVariant string
PID string
PIDsLimit *int64
Pod string
diff --git a/cmd/podman/containers/create.go b/cmd/podman/containers/create.go
index 801547033..5e48aa622 100644
--- a/cmd/podman/containers/create.go
+++ b/cmd/podman/containers/create.go
@@ -66,9 +66,6 @@ func createFlags(flags *pflag.FlagSet) {
_ = flags.MarkHidden("env-host")
_ = flags.MarkHidden("http-proxy")
}
- // Not sure we want these exposed yet. If we do, they need to be documented in man pages
- _ = flags.MarkHidden("override-arch")
- _ = flags.MarkHidden("override-os")
}
func init() {
@@ -254,10 +251,11 @@ func pullImage(imageName string) (string, error) {
return "", errors.Wrapf(define.ErrNoSuchImage, "unable to find a name and tag match for %s in repotags", imageName)
}
pullReport, pullErr := registry.ImageEngine().Pull(registry.GetContext(), imageName, entities.ImagePullOptions{
- Authfile: cliVals.Authfile,
- Quiet: cliVals.Quiet,
- OverrideArch: cliVals.OverrideArch,
- OverrideOS: cliVals.OverrideOS,
+ Authfile: cliVals.Authfile,
+ Quiet: cliVals.Quiet,
+ OverrideArch: cliVals.OverrideArch,
+ OverrideOS: cliVals.OverrideOS,
+ OverrideVariant: cliVals.OverrideVariant,
})
if pullErr != nil {
return "", pullErr
diff --git a/cmd/podman/containers/run.go b/cmd/podman/containers/run.go
index a84cb6814..34eea14e1 100644
--- a/cmd/podman/containers/run.go
+++ b/cmd/podman/containers/run.go
@@ -70,9 +70,6 @@ func runFlags(flags *pflag.FlagSet) {
_ = flags.MarkHidden("http-proxy")
_ = flags.MarkHidden("preserve-fds")
}
- // Not sure we want these exposed yet. If we do, they need to be documented in man pages
- _ = flags.MarkHidden("override-arch")
- _ = flags.MarkHidden("override-os")
}
func init() {
registry.Commands = append(registry.Commands, registry.CliCommand{
diff --git a/cmd/podman/images/pull.go b/cmd/podman/images/pull.go
index 4deaecbf5..d86f9800c 100644
--- a/cmd/podman/images/pull.go
+++ b/cmd/podman/images/pull.go
@@ -82,6 +82,7 @@ func pullFlags(flags *pflag.FlagSet) {
flags.StringVar(&pullOptions.CredentialsCLI, "creds", "", "`Credentials` (USERNAME:PASSWORD) to use for authenticating to a registry")
flags.StringVar(&pullOptions.OverrideArch, "override-arch", "", "Use `ARCH` instead of the architecture of the machine for choosing images")
flags.StringVar(&pullOptions.OverrideOS, "override-os", "", "Use `OS` instead of the running OS for choosing images")
+ flags.StringVar(&pullOptions.OverrideVariant, "override-variant", "", " use VARIANT instead of the running architecture variant for choosing images")
flags.Bool("disable-content-trust", false, "This is a Docker specific option and is a NOOP")
flags.BoolVarP(&pullOptions.Quiet, "quiet", "q", false, "Suppress output information when pulling images")
flags.StringVar(&pullOptions.SignaturePolicy, "signature-policy", "", "`Pathname` of signature policy file (not usually used)")