aboutsummaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2020-08-25 07:33:44 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2020-08-28 09:36:11 -0400
commit3c6603a2f88ab5ba38bf58334417aaa90c458c06 (patch)
treecc31266b9fadabd34b9bbe56ea5abc002f83fdee /cmd/podman
parentf49b98c61019ac04dccd6b3d5bc0c6af7857b17e (diff)
downloadpodman-3c6603a2f88ab5ba38bf58334417aaa90c458c06.tar.gz
podman-3c6603a2f88ab5ba38bf58334417aaa90c458c06.tar.bz2
podman-3c6603a2f88ab5ba38bf58334417aaa90c458c06.zip
Add support for variant when pulling images
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/common/create.go5
-rw-r--r--cmd/podman/common/create_opts.go1
-rw-r--r--cmd/podman/containers/create.go9
-rw-r--r--cmd/podman/containers/run.go1
-rw-r--r--cmd/podman/images/pull.go1
5 files changed, 12 insertions, 5 deletions
diff --git a/cmd/podman/common/create.go b/cmd/podman/common/create.go
index df218a026..2b6f9348e 100644
--- a/cmd/podman/common/create.go
+++ b/cmd/podman/common/create.go
@@ -328,6 +328,11 @@ func GetCreateFlags(cf *ContainerCLIOpts) *pflag.FlagSet {
"override-os", "",
"use `OS` instead of the running OS for choosing images",
)
+ 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 e29c94352..5e48aa622 100644
--- a/cmd/podman/containers/create.go
+++ b/cmd/podman/containers/create.go
@@ -251,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 c60095b64..34eea14e1 100644
--- a/cmd/podman/containers/run.go
+++ b/cmd/podman/containers/run.go
@@ -71,7 +71,6 @@ func runFlags(flags *pflag.FlagSet) {
_ = flags.MarkHidden("preserve-fds")
}
}
-
func init() {
registry.Commands = append(registry.Commands, registry.CliCommand{
Mode: []entities.EngineMode{entities.ABIMode, entities.TunnelMode},
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)")