From 3306d3e120b126fd2238b870733d78dd93787e71 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Tue, 26 Jun 2018 15:58:10 +0200 Subject: rootless: use $HOME/.config/containers/libpod.conf If the file exists, use it to read the configuration. Signed-off-by: Giuseppe Scrivano Closes: #936 Approved by: rhatdan --- libpod/runtime.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libpod/runtime.go b/libpod/runtime.go index b840d65b0..1078c733e 100644 --- a/libpod/runtime.go +++ b/libpod/runtime.go @@ -213,7 +213,10 @@ func NewRuntime(options ...RuntimeOption) (runtime *Runtime, err error) { configPath := ConfigPath foundConfig := true if rootless.IsRootless() { - foundConfig = false + configPath = filepath.Join(os.Getenv("HOME"), ".config/containers/libpod.conf") + if _, err := os.Stat(configPath); err != nil { + foundConfig = false + } } else if _, err := os.Stat(OverrideConfigPath); err == nil { // Use the override configuration path configPath = OverrideConfigPath -- cgit v1.2.3-54-g00ecf