mirror of
https://github.com/containers/podman.git
synced 2025-12-05 12:52:12 +08:00
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>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user