summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/build.go9
-rw-r--r--cmd/podman/main.go4
2 files changed, 13 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)
diff --git a/cmd/podman/main.go b/cmd/podman/main.go
index dc44a9110..2b808b2bc 100644
--- a/cmd/podman/main.go
+++ b/cmd/podman/main.go
@@ -145,6 +145,10 @@ func main() {
if reexec.Init() {
return
}
+ // Hard code TMPDIR functions to use /var/tmp, if user did not override
+ if _, ok := os.LookupEnv("TMPDIR"); !ok {
+ os.Setenv("TMPDIR", "/var/tmp")
+ }
if err := rootCmd.Execute(); err != nil {
outputError(err)
} else {