diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2018-10-12 07:54:13 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-12 07:54:13 -0700 |
commit | 9a933c70b1cf60c48211bc700d726074aa4536a0 (patch) | |
tree | 59b86e95fccb21f26591177747adfcffa6816f85 /cmd/podman/runlabel.go | |
parent | da5c89497f9d6ee5cb6e826d7db7cca5686ab4f7 (diff) | |
parent | 88673a5fcfcedb3ab3f1039a46b3eba912f35e5c (diff) | |
download | podman-9a933c70b1cf60c48211bc700d726074aa4536a0.tar.gz podman-9a933c70b1cf60c48211bc700d726074aa4536a0.tar.bz2 podman-9a933c70b1cf60c48211bc700d726074aa4536a0.zip |
Merge pull request #1611 from QiWang19/issue1340
Support auth file environment variable in related podman commands & add change to man pages
Diffstat (limited to 'cmd/podman/runlabel.go')
-rw-r--r-- | cmd/podman/runlabel.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cmd/podman/runlabel.go b/cmd/podman/runlabel.go index 2d464b949..aa7411a5f 100644 --- a/cmd/podman/runlabel.go +++ b/cmd/podman/runlabel.go @@ -21,7 +21,7 @@ var ( runlabelFlags = []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.BoolFlag{ Name: "display", @@ -165,8 +165,9 @@ func runlabelCmd(c *cli.Context) error { DockerCertPath: c.String("cert-dir"), DockerInsecureSkipTLSVerify: !c.BoolT("tls-verify"), } + authfile := getAuthFile(c.String("authfile")) - newImage, err = runtime.ImageRuntime().New(ctx, runlabelImage, c.String("signature-policy"), c.String("authfile"), stdOut, &dockerRegistryOptions, image.SigningOptions{}, false, false) + newImage, err = runtime.ImageRuntime().New(ctx, runlabelImage, c.String("signature-policy"), authfile, stdOut, &dockerRegistryOptions, image.SigningOptions{}, false, false) } else { newImage, err = runtime.ImageRuntime().NewFromLocal(runlabelImage) } |