summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@pm.me>2019-07-15 16:44:56 -0400
committerMatthew Heon <matthew.heon@pm.me>2019-09-10 10:52:37 -0400
commitc2284962c798a11f3c956ee237f27cfd3b0fcb21 (patch)
treea82ff49ee28be13a9a1702506aa7be051fea9fb1 /cmd
parent16a70490852fdaf3ea5aeea6b2be19dd70fbf1c7 (diff)
downloadpodman-c2284962c798a11f3c956ee237f27cfd3b0fcb21.tar.gz
podman-c2284962c798a11f3c956ee237f27cfd3b0fcb21.tar.bz2
podman-c2284962c798a11f3c956ee237f27cfd3b0fcb21.zip
Add support for launching containers without CGroups
This is mostly used with Systemd, which really wants to manage CGroups itself when managing containers via unit file. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/common.go4
-rw-r--r--cmd/podman/shared/create.go1
-rw-r--r--cmd/podman/shared/intermediate.go2
3 files changed, 7 insertions, 0 deletions
diff --git a/cmd/podman/common.go b/cmd/podman/common.go
index 9724d18c6..0115e6ef1 100644
--- a/cmd/podman/common.go
+++ b/cmd/podman/common.go
@@ -135,6 +135,10 @@ func getCreateFlags(c *cliconfig.PodmanCommand) {
"cgroup namespace to use",
)
createFlags.String(
+ "cgroups", "enabled",
+ "control container cgroup configuration",
+ )
+ createFlags.String(
"cgroup-parent", "",
"Optional parent cgroup for the container",
)
diff --git a/cmd/podman/shared/create.go b/cmd/podman/shared/create.go
index acbd53dba..fc8197721 100644
--- a/cmd/podman/shared/create.go
+++ b/cmd/podman/shared/create.go
@@ -695,6 +695,7 @@ func ParseCreateOpts(ctx context.Context, c *GenericCLIResults, runtime *libpod.
CapDrop: c.StringSlice("cap-drop"),
CidFile: c.String("cidfile"),
Cgroupns: c.String("cgroupns"),
+ Cgroups: c.String("cgroups"),
CgroupParent: c.String("cgroup-parent"),
Command: command,
UserCommand: userCommand,
diff --git a/cmd/podman/shared/intermediate.go b/cmd/podman/shared/intermediate.go
index 5aaac8687..cccdd1bea 100644
--- a/cmd/podman/shared/intermediate.go
+++ b/cmd/podman/shared/intermediate.go
@@ -370,6 +370,8 @@ func NewIntermediateLayer(c *cliconfig.PodmanCommand, remote bool) GenericCLIRes
m["blkio-weight-device"] = newCRStringSlice(c, "blkio-weight-device")
m["cap-add"] = newCRStringSlice(c, "cap-add")
m["cap-drop"] = newCRStringSlice(c, "cap-drop")
+ m["cgroupns"] = newCRString(c, "cgroupns")
+ m["cgroups"] = newCRString(c, "cgroups")
m["cgroup-parent"] = newCRString(c, "cgroup-parent")
m["cidfile"] = newCRString(c, "cidfile")
m["conmon-pidfile"] = newCRString(c, "conmon-pidfile")