diff options
author | Qi Wang <qiwan@redhat.com> | 2018-10-09 09:26:47 -0400 |
---|---|---|
committer | Qi Wang <qiwan@redhat.com> | 2018-10-12 10:05:14 -0400 |
commit | 88673a5fcfcedb3ab3f1039a46b3eba912f35e5c (patch) | |
tree | 59b86e95fccb21f26591177747adfcffa6816f85 /cmd/podman/pull.go | |
parent | da5c89497f9d6ee5cb6e826d7db7cca5686ab4f7 (diff) | |
download | podman-88673a5fcfcedb3ab3f1039a46b3eba912f35e5c.tar.gz podman-88673a5fcfcedb3ab3f1039a46b3eba912f35e5c.tar.bz2 podman-88673a5fcfcedb3ab3f1039a46b3eba912f35e5c.zip |
Support auth file environment variable & add change to man pages
Signed-off-by: Qi Wang <qiwan@redhat.com>
Diffstat (limited to 'cmd/podman/pull.go')
-rw-r--r-- | cmd/podman/pull.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cmd/podman/pull.go b/cmd/podman/pull.go index 097c88536..8fb3971bd 100644 --- a/cmd/podman/pull.go +++ b/cmd/podman/pull.go @@ -21,7 +21,7 @@ var ( pullFlags = []cli.Flag{ cli.StringFlag{ Name: "authfile", - Usage: "Path of the authentication file. Default is ${XDG_RUNTIME_DIR}/containers/auth.json", + Usage: "Path of the authentication file. Default is ${XDG_RUNTIME_DIR}/containers/auth.json. Use REGISTRY_AUTH_FILE environment variable to override. ", }, cli.StringFlag{ Name: "cert-dir", @@ -124,7 +124,8 @@ func pullCmd(c *cli.Context) error { } imgID = newImage[0].ID() } else { - newImage, err := runtime.ImageRuntime().New(getContext(), image, c.String("signature-policy"), c.String("authfile"), writer, &dockerRegistryOptions, image2.SigningOptions{}, true, forceSecure) + authfile := getAuthFile(c.String("authfile")) + newImage, err := runtime.ImageRuntime().New(getContext(), image, c.String("signature-policy"), authfile, writer, &dockerRegistryOptions, image2.SigningOptions{}, true, forceSecure) if err != nil { return errors.Wrapf(err, "error pulling image %q", image) } |