rootless: use $HOME/.config/containers/libpod.conf
If the file exists, use it to read the configuration.
Closes:
Approved by: rhatdan
@@ -213,7 +213,10 @@ func NewRuntime(options ...RuntimeOption) (runtime *Runtime, err error) {
configPath := ConfigPath
foundConfig := true
if rootless.IsRootless() {
+ 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
