mirror of
https://github.com/containers/podman.git
synced 2026-07-17 10:41:58 -04:00
docs/podman-systemd.unit: Update example to work out of the box
- Don't order the container unit before local-fs.target as that creates an ordering cycle that triggers other issues. - Use the example network in the container unit - Only use groups that exists by default for the volume Signed-off-by: Timothée Ravier <tim@siosm.fr>
This commit is contained in:
@@ -551,12 +551,14 @@ Example `test.container`:
|
||||
```
|
||||
[Unit]
|
||||
Description=A minimal container
|
||||
Before=local-fs.target
|
||||
|
||||
[Container]
|
||||
# Use the centos image
|
||||
Image=quay.io/centos/centos:latest
|
||||
|
||||
# Use volume and network defined below
|
||||
Volume=test.volume:/data
|
||||
Network=test.network
|
||||
|
||||
# In the container we just run sleep
|
||||
Exec=sleep 60
|
||||
@@ -589,7 +591,7 @@ Example `test.volume`:
|
||||
```
|
||||
[Volume]
|
||||
User=root
|
||||
Group=projectname
|
||||
Group=root
|
||||
Label=org.test.Key=value
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user