Skip to content

Commit 3c47368

Browse files
committed
rootles tutorial: remove systemd unit example
The example was not entirely correct. Users should use `podman generate systemd` and use the output either directly or as a template for further adjustments to their needs. Keeping an example in the rootless tutorial is a maintenance burdon and can easily suggest incorrect usage patterns to users. Signed-off-by: Valentin Rothberg <[email protected]>
1 parent 220f9a7 commit 3c47368

File tree

1 file changed

+0
-28
lines changed

1 file changed

+0
-28
lines changed

docs/tutorials/rootless_tutorial.md

-28
Original file line numberDiff line numberDiff line change
@@ -110,34 +110,6 @@ The Podman configuration files for root reside in `/usr/share/containers` with o
110110

111111
The default authorization file used by the `podman login` and `podman logout` commands reside in `${XDG_RUNTIME_DIR}/containers/auth.json`.
112112

113-
## Systemd unit for rootless container
114-
115-
```
116-
[Unit]
117-
Description=nginx
118-
119-
120-
[Service]
121-
Type=simple
122-
KillMode=none
123-
MemoryMax=200M
124-
ExecStartPre=-/usr/bin/podman rm -f nginx
125-
ExecStartPre=/usr/bin/podman pull nginx
126-
ExecStart=/usr/bin/podman run --name=nginx -p 8080:80 -v /home/nginx/html:/usr/share/nginx/html:Z nginx
127-
ExecStop=/usr/bin/podman stop nginx
128-
Restart=always
129-
User=nginx
130-
Group=nginx
131-
[Install]
132-
WantedBy=multi-user.target
133-
```
134-
135-
This example unit will launch a nginx container using the existing user nginx with id 1001, serving static content from /home/nginx/html and limited to 200MB of RAM.
136-
137-
You can use all the usual systemd flags to control the process, including capabilities and cgroup directives to limit memory or CPU.
138-
139-
See #3866 for more details.
140-
141113
## More information
142114

143115
If you are still experiencing problems running Podman in a rootless environment, please refer to the [Shortcomings of Rootless Podman](https://github.com/containers/libpod/blob/master/rootless.md) page which lists known issues and solutions to known issues in this environment.

0 commit comments

Comments
 (0)