summaryrefslogtreecommitdiff
path: root/libpod/options.go
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2019-03-28 10:30:09 +0100
committerValentin Rothberg <rothberg@redhat.com>2019-03-28 15:12:26 +0100
commita5443a532b0fc6bd787cbb472c0ad2f75447c9df (patch)
tree691ecc024dfedff5695e426a8f3a6c077cfc34b8 /libpod/options.go
parente7a2eecf5f3975edfb92cd2cacff0d34ef45f808 (diff)
downloadpodman-a5443a532b0fc6bd787cbb472c0ad2f75447c9df.tar.gz
podman-a5443a532b0fc6bd787cbb472c0ad2f75447c9df.tar.bz2
podman-a5443a532b0fc6bd787cbb472c0ad2f75447c9df.zip
vendor buildah, image, storage, cni
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'libpod/options.go')
-rw-r--r--libpod/options.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/libpod/options.go b/libpod/options.go
index 3ca80e96c..e1ffd6ea5 100644
--- a/libpod/options.go
+++ b/libpod/options.go
@@ -9,6 +9,7 @@ import (
"github.com/containers/image/manifest"
"github.com/containers/libpod/pkg/namespaces"
+ "github.com/containers/libpod/pkg/rootless"
"github.com/containers/storage"
"github.com/containers/storage/pkg/idtools"
"github.com/cri-o/ocicni/pkg/ocicni"
@@ -82,11 +83,15 @@ func WithStorageConfig(config storage.StoreOptions) RuntimeOption {
// or graphdriveroptions are set, then GraphRoot and RunRoot
// must be set
if setField {
+ storeOpts, err := storage.DefaultStoreOptions(rootless.IsRootless(), rootless.GetRootlessUID())
+ if err != nil {
+ return err
+ }
if rt.config.StorageConfig.GraphRoot == "" {
- rt.config.StorageConfig.GraphRoot = storage.DefaultStoreOptions.GraphRoot
+ rt.config.StorageConfig.GraphRoot = storeOpts.GraphRoot
}
if rt.config.StorageConfig.RunRoot == "" {
- rt.config.StorageConfig.RunRoot = storage.DefaultStoreOptions.RunRoot
+ rt.config.StorageConfig.RunRoot = storeOpts.RunRoot
}
}