summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-03-10 19:38:49 +0100
committerGitHub <noreply@github.com>2021-03-10 19:38:49 +0100
commit2343161593dc5c2a869849a37e08f84468a6bca9 (patch)
tree3c7fe9a68d5f8d3c48c73fc6e89c64bd04a3f15a /pkg
parent786757fb01208cf72e1c67611acbab1411746036 (diff)
parentc9ef2607104a0b17e5146b3ee01852edb7d3d688 (diff)
downloadpodman-2343161593dc5c2a869849a37e08f84468a6bca9.tar.gz
podman-2343161593dc5c2a869849a37e08f84468a6bca9.tar.bz2
podman-2343161593dc5c2a869849a37e08f84468a6bca9.zip
Merge pull request #9668 from rhatdan/man
Document CONTAINERS_CONF/CONTAINERS_STORAGE_CONF Env variables
Diffstat (limited to 'pkg')
-rw-r--r--pkg/registries/registries.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/pkg/registries/registries.go b/pkg/registries/registries.go
index bf5dee2ce..34c9138e3 100644
--- a/pkg/registries/registries.go
+++ b/pkg/registries/registries.go
@@ -24,7 +24,10 @@ var userRegistriesFile = filepath.Join(os.Getenv("HOME"), ".config/containers/re
// FIXME: This should be centralized in a global SystemContext initializer inherited throughout the code,
// not haphazardly called throughout the way it is being called now.
func SystemRegistriesConfPath() string {
- if envOverride := os.Getenv("REGISTRIES_CONFIG_PATH"); len(envOverride) > 0 {
+ if envOverride, ok := os.LookupEnv("CONTAINERS_REGISTRIES_CONF"); ok {
+ return envOverride
+ }
+ if envOverride, ok := os.LookupEnv("REGISTRIES_CONFIG_PATH"); ok {
return envOverride
}