summaryrefslogtreecommitdiff
path: root/libpod/options.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2018-03-29 11:01:47 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-04-05 14:13:49 +0000
commitfdcf633a33bbbfbc99268965ef5da03a4770619b (patch)
tree59be1ab815261e106220a4691766830b58657ac0 /libpod/options.go
parentca3b2414516c04125f986775c0cbce27f0f1e505 (diff)
downloadpodman-fdcf633a33bbbfbc99268965ef5da03a4770619b.tar.gz
podman-fdcf633a33bbbfbc99268965ef5da03a4770619b.tar.bz2
podman-fdcf633a33bbbfbc99268965ef5da03a4770619b.zip
Add hooks support to podman
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #155 Approved by: mheon
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)