Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI:DOCS] docs/podman-systemd.unit: Update example to work out of the box + Explicitely mention '.network' units #17354

Merged
merged 2 commits into from
Feb 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
travier marked this conversation as resolved.
Show resolved Hide resolved
*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