mirror of
https://github.com/containers/podman.git
synced 2025-06-24 03:08:13 +08:00
systemdgen: specify --cgroups=disabled-conmon for --new
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
@ -153,13 +153,14 @@ func CreateContainerSystemdUnit(info *ContainerInfo, opts Options) (string, erro
|
||||
if len(info.CreateCommand) < index+1 {
|
||||
return "", errors.Errorf("container's create command is too short or invalid: %v", info.CreateCommand)
|
||||
}
|
||||
// We're hard-coding the first four arguments and append the
|
||||
// CreatCommand with a stripped command and subcomand.
|
||||
// We're hard-coding the first five arguments and append the
|
||||
// CreateCommand with a stripped command and subcomand.
|
||||
command := []string{
|
||||
info.Executable,
|
||||
"run",
|
||||
"--conmon-pidfile", "/%t/%n-pid",
|
||||
"--cidfile", "/%t/%n-cid",
|
||||
"--cgroups=no-conmon",
|
||||
}
|
||||
command = append(command, info.CreateCommand[index:]...)
|
||||
info.RunCommand = strings.Join(command, " ")
|
||||
|
@ -122,7 +122,7 @@ Documentation=man:podman-generate-systemd(1)
|
||||
[Service]
|
||||
Restart=always
|
||||
ExecStartPre=/usr/bin/rm -f /%t/%n-pid /%t/%n-cid
|
||||
ExecStart=/usr/bin/podman run --conmon-pidfile /%t/%n-pid --cidfile /%t/%n-cid --name jadda-jadda --hostname hello-world awesome-image:latest command arg1 ... argN
|
||||
ExecStart=/usr/bin/podman run --conmon-pidfile /%t/%n-pid --cidfile /%t/%n-cid --cgroups=no-conmon --name jadda-jadda --hostname hello-world awesome-image:latest command arg1 ... argN
|
||||
ExecStop=/usr/bin/podman stop --ignore --cidfile /%t/%n-cid -t 42
|
||||
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile /%t/%n-cid
|
||||
PIDFile=/%t/%n-pid
|
||||
|
Reference in New Issue
Block a user