summaryrefslogtreecommitdiff
path: root/libpod/options.go
diff options
context:
space:
mode:
Diffstat (limited to 'libpod/options.go')
-rw-r--r--libpod/options.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/libpod/options.go b/libpod/options.go
index 2c51b5834..202cfe9a3 100644
--- a/libpod/options.go
+++ b/libpod/options.go
@@ -186,6 +186,19 @@ func WithHooksDir(hooksDir string) RuntimeOption {
}
}
+// WithDefaultMountsFile sets the file to look at for default mounts (mainly secrets)
+// Note we are not saving this in the database as it is for testing purposes only
+func WithDefaultMountsFile(mountsFile string) RuntimeOption {
+ return func(rt *Runtime) error {
+ if rt.valid {
+ return ErrRuntimeFinalized
+ }
+
+ rt.config.DefaultMountsFile = []string{mountsFile}
+ return nil
+ }
+}
+
// WithTmpDir sets the directory that temporary runtime files which are not
// expected to survive across reboots will be stored
// This should be located on a tmpfs mount (/tmp or /var/run for example)