summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2021-03-08 16:04:20 -0500
committerDaniel J Walsh <dwalsh@redhat.com>2021-03-10 06:34:47 -0500
commitc9ef2607104a0b17e5146b3ee01852edb7d3d688 (patch)
tree242c642f1495c16038bf4145d583fa67f0e27d0e /pkg
parent5331096b3882cd5c8e587200560e44ef1eb990a3 (diff)
downloadpodman-c9ef2607104a0b17e5146b3ee01852edb7d3d688.tar.gz
podman-c9ef2607104a0b17e5146b3ee01852edb7d3d688.tar.bz2
podman-c9ef2607104a0b17e5146b3ee01852edb7d3d688.zip
Document CONTAINERS_CONF/CONTAINERS_STORAGE_CONF Env variables
Also Switch to using CONTAINERS_REGISTRIES_CONF for registries.conf overrides. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
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
}