diff options
author | Giuseppe Scrivano <gscrivan@redhat.com> | 2018-06-26 15:58:10 +0200 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-06-27 14:07:17 +0000 |
commit | 3306d3e120b126fd2238b870733d78dd93787e71 (patch) | |
tree | d2ca8813250f013700e5c67088a87098c4b705ba /libpod/runtime.go | |
parent | ea06dccba2e87794cd2be051bba3ae7847c08598 (diff) | |
download | podman-3306d3e120b126fd2238b870733d78dd93787e71.tar.gz podman-3306d3e120b126fd2238b870733d78dd93787e71.tar.bz2 podman-3306d3e120b126fd2238b870733d78dd93787e71.zip |
rootless: use $HOME/.config/containers/libpod.conf
If the file exists, use it to read the configuration.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Closes: #936
Approved by: rhatdan
Diffstat (limited to 'libpod/runtime.go')
-rw-r--r-- | libpod/runtime.go | 5 |
1 files changed, 4 insertions, 1 deletions
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 |