summaryrefslogtreecommitdiff
path: root/libpod/options.go
diff options
context:
space:
mode:
Diffstat (limited to 'libpod/options.go')
-rw-r--r--libpod/options.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/libpod/options.go b/libpod/options.go
index 081a20f37..8097f3a64 100644
--- a/libpod/options.go
+++ b/libpod/options.go
@@ -295,6 +295,18 @@ func WithShmDir(dir string) CtrCreateOption {
}
}
+// WithShmSize sets the size of /dev/shm tmpfs mount
+func WithShmSize(size int64) CtrCreateOption {
+ return func(ctr *Container) error {
+ if ctr.valid {
+ return ErrCtrFinalized
+ }
+
+ ctr.config.ShmSize = size
+ return nil
+ }
+}
+
// WithSELinuxLabels sets the mount label for SELinux
func WithSELinuxLabels(processLabel, mountLabel string) CtrCreateOption {
return func(ctr *Container) error {