aboutsummaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2019-09-05 09:07:52 +0200
committerGiuseppe Scrivano <gscrivan@redhat.com>2019-09-06 22:55:46 +0200
commit06f94bef1f159b4717e91f36c33759df4ed4358b (patch)
tree15cfe30344be6ca0531227398e33d5c4b6ee2d42 /cmd/podman
parent30cbb0091515a7f802f0f3f3ee486be6ff98f645 (diff)
downloadpodman-06f94bef1f159b4717e91f36c33759df4ed4358b.tar.gz
podman-06f94bef1f159b4717e91f36c33759df4ed4358b.tar.bz2
podman-06f94bef1f159b4717e91f36c33759df4ed4358b.zip
build: pass down the cgroup manager to buildah
Pass down the cgroup manager to use to buildah. Closes: https://github.com/containers/libpod/issues/3938 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/build.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/cmd/podman/build.go b/cmd/podman/build.go
index 14ac51889..8eb12cacd 100644
--- a/cmd/podman/build.go
+++ b/cmd/podman/build.go
@@ -10,6 +10,7 @@ import (
"github.com/containers/buildah/imagebuildah"
buildahcli "github.com/containers/buildah/pkg/cli"
"github.com/containers/libpod/cmd/podman/cliconfig"
+ "github.com/containers/libpod/libpod"
"github.com/containers/libpod/pkg/adapter"
"github.com/docker/go-units"
"github.com/opencontainers/runtime-spec/specs-go"
@@ -225,6 +226,14 @@ func buildCmd(c *cliconfig.BuildValues) error {
for _, arg := range c.RuntimeFlags {
runtimeFlags = append(runtimeFlags, "--"+arg)
}
+
+ conf, err := runtime.GetConfig()
+ if err != nil {
+ return err
+ }
+ if conf != nil && conf.CgroupManager == libpod.SystemdCgroupsManager {
+ runtimeFlags = append(runtimeFlags, "--systemd-cgroup")
+ }
// end from buildah
defer runtime.DeferredShutdown(false)