summaryrefslogtreecommitdiff
path: root/libpod/options.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2022-03-28 09:10:14 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2022-04-12 13:35:51 -0400
commit3987c529f473178c51feb69d5252c7d5c2a8f697 (patch)
tree3c299765c94c8867d8d10efef719eab864490a10 /libpod/options.go
parent87d129e805c993acbc571597baba8101afd475fe (diff)
downloadpodman-3987c529f473178c51feb69d5252c7d5c2a8f697.tar.gz
podman-3987c529f473178c51feb69d5252c7d5c2a8f697.tar.bz2
podman-3987c529f473178c51feb69d5252c7d5c2a8f697.zip
Add support for ipc namespace modes "none, private, sharable"
Fixes: #13265 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'libpod/options.go')
-rw-r--r--libpod/options.go24
1 files changed, 24 insertions, 0 deletions
diff --git a/libpod/options.go b/libpod/options.go
index 2e5454393..34c06cc5d 100644
--- a/libpod/options.go
+++ b/libpod/options.go
@@ -559,6 +559,30 @@ func WithShmDir(dir string) CtrCreateOption {
}
}
+// WithNOShmMount tells libpod whether to mount /dev/shm
+func WithNoShm(mount bool) CtrCreateOption {
+ return func(ctr *Container) error {
+ if ctr.valid {
+ return define.ErrCtrFinalized
+ }
+
+ ctr.config.NoShm = mount
+ return nil
+ }
+}
+
+// WithNoShmShare tells libpod whether to share containers /dev/shm with other containers
+func WithNoShmShare(share bool) CtrCreateOption {
+ return func(ctr *Container) error {
+ if ctr.valid {
+ return define.ErrCtrFinalized
+ }
+
+ ctr.config.NoShmShare = share
+ return nil
+ }
+}
+
// WithSystemd turns on systemd mode in the container
func WithSystemd() CtrCreateOption {
return func(ctr *Container) error {