summaryrefslogtreecommitdiff
path: root/docs/source/markdown
diff options
context:
space:
mode:
author荒野無燈 <ttys3@outlook.com>2020-03-10 12:28:03 +0800
committer荒野無燈 <ttys3@outlook.com>2020-03-14 21:54:12 +0800
commit194723f314f505de3d39afb7fd769bc02293fd88 (patch)
treea7a4a9f6ddfb8ddaaa3527c31472c5c502da9389 /docs/source/markdown
parentf378e82e2d57ee60e5b0f973eb1ea2ee3a760428 (diff)
downloadpodman-194723f314f505de3d39afb7fd769bc02293fd88.tar.gz
podman-194723f314f505de3d39afb7fd769bc02293fd88.tar.bz2
podman-194723f314f505de3d39afb7fd769bc02293fd88.zip
force run container detached if container CreateCommand missing the detach param
the podman generated systemd service file has `Type=forking` service, so the command after `ExecStart=` should not run in front. if someone created a container and has the detach(`-d`) param missing like this ``` podman create --name ngxdemo -P nginxdemos/hello ``` and generate the file with `--new` param: ``` podman generate systemd --name --new ngxdemo ``` because `podman run xxx` has no `-d` param, so the container is not run in background and nerver exit. and systemd will fail to start the service: ``` sudo systemctl start container-ngxdemo.service Job for container-ngxdemo.service failed because a timeout was exceeded. See "systemctl status container-ngxdemo.service" and "journalctl -xe" for details. ``` Signed-off-by: 荒野無燈 <ttys3@outlook.com>
Diffstat (limited to 'docs/source/markdown')
-rw-r--r--docs/source/markdown/podman-generate-systemd.1.md1
1 files changed, 1 insertions, 0 deletions
diff --git a/docs/source/markdown/podman-generate-systemd.1.md b/docs/source/markdown/podman-generate-systemd.1.md
index 4d3f9ba48..3199232fa 100644
--- a/docs/source/markdown/podman-generate-systemd.1.md
+++ b/docs/source/markdown/podman-generate-systemd.1.md
@@ -25,6 +25,7 @@ Use the name of the container for the start, stop, and description in the unit f
**--new**
Create a new container via podman-run instead of starting an existing one. This option relies on container configuration files, which may not map directly to podman CLI flags; please review the generated output carefully before placing in production.
+Since we use systemd `Type=forking` service, using this option will force the container run with the detached param `-d`
**--timeout**, **-t**=*value*