Skip to content

Commit

Permalink
Merge pull request #17354 from travier/quadlet-examples
Browse files Browse the repository at this point in the history
[CI:DOCS] docs/podman-systemd.unit: Update example to work out of the box + Explicitely mention '.network' units
  • Loading branch information
openshift-merge-robot authored Feb 7, 2023
2 parents dcbe018 + 4e8906c commit c4ec99a
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions docs/source/markdown/podman-systemd.unit.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ podman\-systemd.unit - systemd units using Podman quadlet

## SYNOPSIS

*name*.container, *name*.volume
*name*.container, *name*.volume, *name*.network, `*.kube`

### Podman unit search path

Expand All @@ -26,8 +26,10 @@ These files are read during boot (and when `systemctl daemon-reload` is run) and
corresponding regular systemd service unit files. Both system and user systemd units are supported.

The Podman generator reads the search paths above and reads files with the extensions `.container`
and `.volume`, and for each file generates a similarly named `.service` file. These units can be started
and managed with systemctl like any other systemd service.
`.volume` and `*.kube`, and for each file generates a similarly named `.service` file. These units
can be started and managed with systemctl like any other systemd service.

Files with the `.network` extension are only read if they are mentioned in a `.container` file. See the `Network=` key.

The Podman files use the same format as [regular systemd unit files](https://www.freedesktop.org/software/systemd/man/systemd.syntax.html).
Each file type has a custom section (for example, `[Container]`) that is handled by Podman, and all
Expand Down Expand Up @@ -551,12 +553,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
Expand Down Expand Up @@ -589,7 +593,7 @@ Example `test.volume`:
```
[Volume]
User=root
Group=projectname
Group=root
Label=org.test.Key=value
```

Expand Down

0 comments on commit c4ec99a

Please sign in to comment.