summaryrefslogtreecommitdiff
path: root/pkg/registries/registries.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2018-11-19 08:44:57 -0800
committerGitHub <noreply@github.com>2018-11-19 08:44:57 -0800
commit64a29e383bb1c12b94a3f6f6be4538f9758d7fb9 (patch)
treef840ae31f0cb6c7d9ea6579e0b778fe58dd609b2 /pkg/registries/registries.go
parent4eecc8cf70728d733aa8d1c948093d9ae4a334df (diff)
parent027d6ca6de3644414ee1f847d161184d027e4137 (diff)
downloadpodman-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.go6
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")