diff options
author | Nalin Dahyabhai <nalin@redhat.com> | 2019-10-16 11:57:45 -0400 |
---|---|---|
committer | Nalin Dahyabhai <nalin@redhat.com> | 2019-10-29 13:35:19 -0400 |
commit | b9313d355e8cd6307d8772ad9c21958ffe981e5b (patch) | |
tree | f186c35ba6cf3414e39750330d10773687f7e7d2 /cmd/podman/pull.go | |
parent | 803357334ce72e14f263a0951d83cdab3fff2bde (diff) | |
download | podman-b9313d355e8cd6307d8772ad9c21958ffe981e5b.tar.gz podman-b9313d355e8cd6307d8772ad9c21958ffe981e5b.tar.bz2 podman-b9313d355e8cd6307d8772ad9c21958ffe981e5b.zip |
pull/create: add --override-arch/--override-os flags
Add --override-arch and --override-os as hidden flags, in line with the
global flag names that skopeo uses, so that we can test behavior around
manifest lists without having to conditionalize more of it by arch.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Diffstat (limited to 'cmd/podman/pull.go')
-rw-r--r-- | cmd/podman/pull.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cmd/podman/pull.go b/cmd/podman/pull.go index 905b1987d..d64793147 100644 --- a/cmd/podman/pull.go +++ b/cmd/podman/pull.go @@ -54,6 +54,10 @@ func init() { flags.BoolVar(&pullCommand.AllTags, "all-tags", false, "All tagged images in the repository will be pulled") flags.StringVar(&pullCommand.Creds, "creds", "", "`Credentials` (USERNAME:PASSWORD) to use for authenticating to a registry") flags.BoolVarP(&pullCommand.Quiet, "quiet", "q", false, "Suppress output information when pulling images") + flags.StringVar(&pullCommand.OverrideArch, "override-arch", "", "use `ARCH` instead of the architecture of the machine for choosing images") + markFlagHidden(flags, "override-arch") + flags.StringVar(&pullCommand.OverrideOS, "override-os", "", "use `OS` instead of the running OS for choosing images") + markFlagHidden(flags, "override-os") // Disabled flags for the remote client if !remote { flags.StringVar(&pullCommand.Authfile, "authfile", shared.GetAuthFile(""), "Path of the authentication file. Use REGISTRY_AUTH_FILE environment variable to override") @@ -122,6 +126,8 @@ func pullCmd(c *cliconfig.PullValues) (retError error) { dockerRegistryOptions := image.DockerRegistryOptions{ DockerRegistryCreds: registryCreds, DockerCertPath: c.CertDir, + OSChoice: c.OverrideOS, + ArchitectureChoice: c.OverrideArch, } if c.IsSet("tls-verify") { dockerRegistryOptions.DockerInsecureSkipTLSVerify = types.NewOptionalBool(!c.TlsVerify) |