diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-09-08 17:29:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-08 17:29:30 +0200 |
commit | f500feb2f19b88592211841e4b30fe16a9aa30b3 (patch) | |
tree | dfda1e1e8da850c9ead4156a5a51d1003ec43b5b /cmd | |
parent | 731281193a3cb739a5a8401aab550c06cb72a983 (diff) | |
parent | 06f94bef1f159b4717e91f36c33759df4ed4358b (diff) | |
download | podman-f500feb2f19b88592211841e4b30fe16a9aa30b3.tar.gz podman-f500feb2f19b88592211841e4b30fe16a9aa30b3.tar.bz2 podman-f500feb2f19b88592211841e4b30fe16a9aa30b3.zip |
Merge pull request #3944 from giuseppe/build-cgroup-manager
build: pass down the cgroup manager to buildah
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/podman/build.go | 9 |
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) |