diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-04-16 12:30:01 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-16 12:30:01 -0400 |
commit | 8d3075e33267663bf2a251bfd60bd825397114c9 (patch) | |
tree | 17efa4577cd6a895d492a38767b32ee1cac2dc74 /libpod/options.go | |
parent | 25eeaec219ccc49dcb35e098afaed7d7987cbee1 (diff) | |
parent | 3987c529f473178c51feb69d5252c7d5c2a8f697 (diff) | |
download | podman-8d3075e33267663bf2a251bfd60bd825397114c9.tar.gz podman-8d3075e33267663bf2a251bfd60bd825397114c9.tar.bz2 podman-8d3075e33267663bf2a251bfd60bd825397114c9.zip |
Merge pull request #13583 from rhatdan/ipc
Add support for ipc namespace modes "none, private, sharable"
Diffstat (limited to 'libpod/options.go')
-rw-r--r-- | libpod/options.go | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/libpod/options.go b/libpod/options.go index 6c4b4cc42..ffd0e6037 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 { |