From f936b745b66de3cbbdf924a26bb35766afe5acba Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Mon, 26 Mar 2018 20:09:10 +0200 Subject: 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 Closes: #549 Approved by: rhatdan --- cmd/podman/run.go | 1 + 1 file changed, 1 insertion(+) (limited to 'cmd/podman/run.go') diff --git a/cmd/podman/run.go b/cmd/podman/run.go index 21320f57c..10f68e9da 100644 --- a/cmd/podman/run.go +++ b/cmd/podman/run.go @@ -84,6 +84,7 @@ func runCmd(c *cli.Context) error { // Gather up the options for NewContainer which consist of With... funcs options = append(options, libpod.WithRootFSFromImage(createConfig.ImageID, createConfig.Image, useImageVolumes)) options = append(options, libpod.WithSELinuxLabels(createConfig.ProcessLabel, createConfig.MountLabel)) + options = append(options, libpod.WithConmonPidFile(createConfig.ConmonPidFile)) options = append(options, libpod.WithLabels(createConfig.Labels)) options = append(options, libpod.WithUser(createConfig.User)) options = append(options, libpod.WithShmDir(createConfig.ShmDir)) -- cgit v1.2.3-54-g00ecf