podman: new option --conmon-pidfile=

so that it is possible to use systemd to automatically restart the
container:

[Service]
Type=forking
PIDFile=/run/awesome-service.pid
ExecStart=/usr/bin/podman run --conmon-pidfile=/run/awesome-service.pid --name awesome -d IMAGE /usr/bin/do-something
ExecStopPost=/usr/bin/podman rm awesome
Restart=always

Closes: https://github.com/projectatomic/libpod/issues/534

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #549
Approved by: rhatdan
This commit is contained in:
Giuseppe Scrivano
2018-03-26 20:09:10 +02:00
committed by Atomic Bot
parent ecda694a92
commit f936b745b6
6 changed files with 24 additions and 0 deletions

View File

@ -251,6 +251,8 @@ type ContainerConfig struct {
CgroupParent string `json:"cgroupParent"`
// LogPath log location
LogPath string `json:"logPath"`
// File containing the conmon PID
ConmonPidFile string `json:"conmonPidFile,omitempty"`
// TODO log options for log drivers
}