diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2018-11-19 08:44:57 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-19 08:44:57 -0800 |
commit | 64a29e383bb1c12b94a3f6f6be4538f9758d7fb9 (patch) | |
tree | f840ae31f0cb6c7d9ea6579e0b778fe58dd609b2 /pkg/registries/registries.go | |
parent | 4eecc8cf70728d733aa8d1c948093d9ae4a334df (diff) | |
parent | 027d6ca6de3644414ee1f847d161184d027e4137 (diff) | |
download | podman-64a29e383bb1c12b94a3f6f6be4538f9758d7fb9.tar.gz podman-64a29e383bb1c12b94a3f6f6be4538f9758d7fb9.tar.bz2 podman-64a29e383bb1c12b94a3f6f6be4538f9758d7fb9.zip |
Merge pull request #1806 from giuseppe/rootless-create-default-files
rootless: create user conf files when they don't exist
Diffstat (limited to 'pkg/registries/registries.go')
-rw-r--r-- | pkg/registries/registries.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pkg/registries/registries.go b/pkg/registries/registries.go index 73aa93d68..c26f15cb6 100644 --- a/pkg/registries/registries.go +++ b/pkg/registries/registries.go @@ -38,8 +38,10 @@ func GetRegistries() ([]string, error) { func GetInsecureRegistries() ([]string, error) { registryConfigPath := "" - if _, err := os.Stat(userRegistriesFile); err == nil { - registryConfigPath = userRegistriesFile + if rootless.IsRootless() { + if _, err := os.Stat(userRegistriesFile); err == nil { + registryConfigPath = userRegistriesFile + } } envOverride := os.Getenv("REGISTRIES_CONFIG_PATH") |