summaryrefslogtreecommitdiff
path: root/docs/podman-run.1.md
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2018-12-17 16:14:11 -0500
committerDaniel J Walsh <dwalsh@redhat.com>2018-12-18 12:50:50 -0500
commit59635cd1863a7da7a198e14c4d48464eef15aa00 (patch)
tree3f99f71a04d565ed103c2a75742180b7332c837c /docs/podman-run.1.md
parent3ec11ac77c54acbe5d1b66918434e2d4db3ca3cf (diff)
downloadpodman-59635cd1863a7da7a198e14c4d48464eef15aa00.tar.gz
podman-59635cd1863a7da7a198e14c4d48464eef15aa00.tar.bz2
podman-59635cd1863a7da7a198e14c4d48464eef15aa00.zip
Add information on --restart
We need to recommend that users use Systemd unit files if they want the container to restart automatically. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'docs/podman-run.1.md')
-rw-r--r--docs/podman-run.1.md25
1 files changed, 24 insertions, 1 deletions
diff --git a/docs/podman-run.1.md b/docs/podman-run.1.md
index 5917f6f7a..c0a466a9c 100644
--- a/docs/podman-run.1.md
+++ b/docs/podman-run.1.md
@@ -497,6 +497,14 @@ By default a container will have its root filesystem writable allowing processes
to write files anywhere. By specifying the `--read-only` flag the container will have
its root filesystem mounted as read only prohibiting any writes.
+**--restart=""**
+
+Not implemented.
+
+Restart should be handled via a systemd unit files. Please add your podman
+commands to a unit file and allow systemd or your init system to handle the
+restarting of the container processes. See example below.
+
**--rm**=*true*|*false*
Automatically remove the container when it exits. The default is *false*.
@@ -1059,13 +1067,28 @@ the uid and gid from the host.
$ podman run --uidmap 0:30000:7000 --gidmap 0:30000:7000 fedora echo hello
```
+### Running a podman container to restart inside of a systemd unit file
+
+
+```
+[Unit]
+Description=My App
+[Service]
+Restart=always
+ExecStart=/usr/bin/podman start -a my_app
+ExecStop=/usr/bin/podman stop -t 10 my_app
+KillMode=process
+[Install]
+WantedBy=multi-user.target
+```
+
## FILES
**/etc/subuid**
**/etc/subgid**
## SEE ALSO
-subgid(5), subuid(5), libpod.conf(5)
+subgid(5), subuid(5), libpod.conf(5), systemd.unit(5)
## HISTORY
September 2018, updated by Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>