summaryrefslogtreecommitdiff
path: root/libpod/options.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2018-10-16 13:26:20 -0400
committerGitHub <noreply@github.com>2018-10-16 13:26:20 -0400
commita2266c63b4368eebfe3a1b9ea469c65e7cceb69a (patch)
treecd26d33445fb2850e78c89869002efb1abfd2bff /libpod/options.go
parent81e63ac309e8bde6603faf07a98a7963e9397188 (diff)
parent57a8c2e5e844ee403c9a703c621780de7c7343f0 (diff)
downloadpodman-a2266c63b4368eebfe3a1b9ea469c65e7cceb69a.tar.gz
podman-a2266c63b4368eebfe3a1b9ea469c65e7cceb69a.tar.bz2
podman-a2266c63b4368eebfe3a1b9ea469c65e7cceb69a.zip
Merge pull request #1650 from rhatdan/systemd
Mount proper cgroup for systemd to manage inside of the container.
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 9f966cead..228b38ba5 100644
--- a/libpod/options.go
+++ b/libpod/options.go
@@ -349,6 +349,18 @@ func WithShmDir(dir string) CtrCreateOption {
}
}
+// WithSystemd turns on systemd mode in the container
+func WithSystemd() CtrCreateOption {
+ return func(ctr *Container) error {
+ if ctr.valid {
+ return ErrCtrFinalized
+ }
+
+ ctr.config.Systemd = true
+ return nil
+ }
+}
+
// WithShmSize sets the size of /dev/shm tmpfs mount.
func WithShmSize(size int64) CtrCreateOption {
return func(ctr *Container) error {