summaryrefslogtreecommitdiff
path: root/cmd/podman/push.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/push.go')
-rw-r--r--cmd/podman/push.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/cmd/podman/push.go b/cmd/podman/push.go
index 9f2f41835..331f92cd2 100644
--- a/cmd/podman/push.go
+++ b/cmd/podman/push.go
@@ -58,7 +58,7 @@ var (
},
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. ",
},
}
pushDescription = fmt.Sprintf(`
@@ -165,5 +165,7 @@ func pushCmd(c *cli.Context) error {
return err
}
- return newImage.PushImageToHeuristicDestination(getContext(), destName, manifestType, c.String("authfile"), c.String("signature-policy"), writer, c.Bool("compress"), so, &dockerRegistryOptions, forceSecure, nil)
+ authfile := getAuthFile(c.String("authfile"))
+
+ return newImage.PushImageToHeuristicDestination(getContext(), destName, manifestType, authfile, c.String("signature-policy"), writer, c.Bool("compress"), so, &dockerRegistryOptions, forceSecure, nil)
}