From dd0d35deb098b63f8c5be7ef9d8d63c16760221b Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Wed, 10 Jan 2018 15:58:18 -0500 Subject: Add support for shm-size. Signed-off-by: Daniel J Walsh Closes: #206 Approved by: TomSweeneyRedHat --- libpod/options.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'libpod/options.go') diff --git a/libpod/options.go b/libpod/options.go index 199bf9ee9..cd1ad5eda 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 { -- cgit v1.2.3-54-g00ecf