From 88673a5fcfcedb3ab3f1039a46b3eba912f35e5c Mon Sep 17 00:00:00 2001 From: Qi Wang Date: Tue, 9 Oct 2018 09:26:47 -0400 Subject: Support auth file environment variable & add change to man pages Signed-off-by: Qi Wang --- cmd/podman/runlabel.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'cmd/podman/runlabel.go') 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) } -- cgit v1.2.3-54-g00ecf