Skip to content

Commit 105a1bf

Browse files
committed
docs: fix [Build] Volume= to not reference named volumes
The [Build] Volume= documentation incorrectly described support for SOURCE-VOLUME (named volumes) and .volume Quadlet unit references. These features are only available in [Container] Volume=, not in [Build] Volume=, because podman build --volume only supports host directory bind mounts. Simplify the description to match the actual podman build --volume behavior and add a note clarifying the difference from [Container] Volume=. Fixes #25514 Signed-off-by: Kit Dallege <xaum.io@gmail.com>
1 parent f09b667 commit 105a1bf

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

docs/source/markdown/podman-systemd.unit.5.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2053,15 +2053,13 @@ This is equivalent to the `--variant` option of `podman build`.
20532053

20542054
### `Volume=`
20552055

2056-
Mount a volume to containers when executing RUN instructions during the build. This is equivalent to
2057-
the `--volume` option of `podman build`, and generally has the form
2058-
`[[SOURCE-VOLUME|HOST-DIR:]CONTAINER-DIR[:OPTIONS]]`.
2056+
Mount a host directory into containers when executing RUN instructions during the build. This is equivalent to
2057+
the `--volume` option of `podman build`, and has the form
2058+
`[HOST-DIR:]CONTAINER-DIR[:OPTIONS]`.
20592059

2060-
If `SOURCE-VOLUME` starts with `.`, Quadlet resolves the path relative to the location of the unit file.
2061-
2062-
Special case:
2060+
If `HOST-DIR` starts with `.`, Quadlet resolves the path relative to the location of the unit file.
20632061

2064-
* If `SOURCE-VOLUME` ends with `.volume`, Quadlet will look for the corresponding `.volume` Quadlet unit. If found, Quadlet will use the name of the Volume set in the Unit, otherwise, `systemd-$name` is used. The generated systemd service contains a dependency on the service unit generated for that `.volume` unit, or on `$name-volume.service` if the `.volume` unit is not found. Note: the corresponding `.volume` file must exist.
2062+
Note: unlike the `[Container]` section's `Volume=`, this option does not support named volumes or `.volume` Quadlet unit references, because `podman build --volume` only supports host directory bind mounts.
20652063

20662064
This key can be listed multiple times.
20672065

0 commit comments

Comments
 (0)