summaryrefslogtreecommitdiff
path: root/libpod/options.go
diff options
context:
space:
mode:
Diffstat (limited to 'libpod/options.go')
-rw-r--r--libpod/options.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/libpod/options.go b/libpod/options.go
index 8fb6c8d2e..f9d6cb211 100644
--- a/libpod/options.go
+++ b/libpod/options.go
@@ -172,6 +172,20 @@ func WithStaticDir(dir string) RuntimeOption {
}
}
+// WithHooksDir sets the directory to look for OCI runtime hooks config
+// Note we are not saving this in database, since this is really just for used
+// for testing
+func WithHooksDir(hooksDir string) RuntimeOption {
+ return func(rt *Runtime) error {
+ if rt.valid {
+ return ErrRuntimeFinalized
+ }
+
+ rt.config.HooksDir = hooksDir
+ 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)