From c9ef2607104a0b17e5146b3ee01852edb7d3d688 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Mon, 8 Mar 2021 16:04:20 -0500 Subject: 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 --- pkg/registries/registries.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'pkg') 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 } -- cgit v1.2.3-54-g00ecf