summaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/build.go9
-rw-r--r--cmd/podman/common.go11
2 files changed, 15 insertions, 5 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/common.go b/cmd/podman/common.go
index 32478bb51..9724d18c6 100644
--- a/cmd/podman/common.go
+++ b/cmd/podman/common.go
@@ -22,7 +22,8 @@ var (
)
const (
- idTruncLength = 12
+ idTruncLength = 12
+ sizeWithUnitFormat = "(format: `<number>[<unit>]`, where unit = b (bytes), k (kilobytes), m (megabytes), or g (gigabytes))"
)
func splitCamelCase(src string) string {
@@ -302,7 +303,7 @@ func getCreateFlags(c *cliconfig.PodmanCommand) {
)
createFlags.String(
"kernel-memory", "",
- "Kernel memory limit (format: `<number>[<unit>]`, where unit = b, k, m or g)",
+ "Kernel memory limit "+sizeWithUnitFormat,
)
createFlags.StringArrayP(
"label", "l", []string{},
@@ -326,11 +327,11 @@ func getCreateFlags(c *cliconfig.PodmanCommand) {
)
createFlags.StringP(
"memory", "m", "",
- "Memory limit (format: <number>[<unit>], where unit = b, k, m or g)",
+ "Memory limit "+sizeWithUnitFormat,
)
createFlags.String(
"memory-reservation", "",
- "Memory soft limit (format: <number>[<unit>], where unit = b, k, m or g)",
+ "Memory soft limit "+sizeWithUnitFormat,
)
createFlags.String(
"memory-swap", "",
@@ -422,7 +423,7 @@ func getCreateFlags(c *cliconfig.PodmanCommand) {
)
createFlags.String(
"shm-size", cliconfig.DefaultShmSize,
- "Size of `/dev/shm`. The format is `<number><unit>`",
+ "Size of /dev/shm "+sizeWithUnitFormat,
)
createFlags.String(
"stop-signal", "",