summaryrefslogtreecommitdiff
path: root/libpod/runtime.go
diff options
context:
space:
mode:
Diffstat (limited to 'libpod/runtime.go')
-rw-r--r--libpod/runtime.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/libpod/runtime.go b/libpod/runtime.go
index e01fa781b..6a5d2ad39 100644
--- a/libpod/runtime.go
+++ b/libpod/runtime.go
@@ -278,6 +278,15 @@ func NewRuntime(options ...RuntimeOption) (runtime *Runtime, err error) {
deepcopier.Copy(defaultRuntimeConfig).To(runtime.config)
runtime.config.TmpDir = tmpDir
+ if rootless.IsRootless() {
+ // If we're rootless, override the default storage config
+ storageConf, err := util.GetDefaultRootlessStoreOptions()
+ if err != nil {
+ return nil, errors.Wrapf(err, "error retrieving rootless storage config")
+ }
+ runtime.config.StorageConfig = storageConf
+ }
+
configPath := ConfigPath
foundConfig := true
rootlessConfigPath := ""