Skip to content

docs: fix [Build] Volume= to not reference named volumes#28389

Open
kovan wants to merge 2 commits intocontainers:mainfrom
kovan:docs/fix-build-volume-docs
Open

docs: fix [Build] Volume= to not reference named volumes#28389
kovan wants to merge 2 commits intocontainers:mainfrom
kovan:docs/fix-build-volume-docs

Conversation

@kovan
Copy link
Copy Markdown

@kovan kovan commented Mar 26, 2026

The [Build] Volume= documentation incorrectly described support for named volumes (SOURCE-VOLUME) 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 syntax description to [HOST-DIR:]CONTAINER-DIR[:OPTIONS]
  • Remove the .volume special case section
  • Add a note clarifying the difference from [Container] Volume=

Fixes #25514

Copy link
Copy Markdown
Member

@danishprakash danishprakash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that changes from #28388 were mistakenly added to this PR too. Can you clean this up?

The [Build] Volume= documentation incorrectly described support for
named volumes and .volume Quadlet unit references, which are only
available in [Container] Volume=.

Fixes containers#25514

Signed-off-by: Kit Dallege <xaum.io@gmail.com>
@kovan kovan force-pushed the docs/fix-build-volume-docs branch from 105a1bf to ecc6d62 Compare March 27, 2026 16:58
@kovan
Copy link
Copy Markdown
Author

kovan commented Mar 27, 2026

Cleaned up - force-pushed with only the systemd.unit.5.md change. The reload-systemd changes from #28388 are no longer included. Sorry about the mess.

@packit-as-a-service
Copy link
Copy Markdown

[NON-BLOCKING] Packit jobs failed. @containers/packit-build please check. Everyone else, feel free to ignore.

@TomSweeneyRedHat
Copy link
Copy Markdown
Member

LGTM, but I'd like someone with deeper Quadlet knowledge to take a look.
Tests were flaking, I've restarted.

Copy link
Copy Markdown
Member

@Honny1 Honny1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PTAL @ygalblum

If `HOST-DIR` starts with `.`, Quadlet resolves the path relative to the location of the unit file.

* 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.
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.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would update the note for [Build] Volume= to clarify that podman build --volume only supports host directory bind mounts. Because of this, .volume references and named volumes may not work, even though Quadlet resolves them.

Update the note to reflect that Quadlet does resolve .volume
references and named volumes for [Build] Volume=, but they may
not work as expected because podman build --volume only supports
host directory bind mounts.
Copy link
Copy Markdown
Member

@Honny1 Honny1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but you forgot to sign the commit. Please sign your commits.

@Honny1
Copy link
Copy Markdown
Member

Honny1 commented Apr 1, 2026

PTAL @ygalblum @containers/podman-maintainers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

podman-systemd [Build] Volume= documentation bug

5 participants