mirror of
https://github.com/containers/podman.git
synced 2026-03-30 20:43:40 -04:00
.build files allow to build an image via Quadlet. The keys from a .build
file are translated to arguments of a `podman build` command by Quadlet.
Minimal keys for .build files are `ImageTag=` and a context directory,
see `SetWorkingDirectory=`, or a `File=` pointing to a Containerfile.
After sorting .build files into the Quadlet dependency order, there
remains a possible dependency cycle issue between .volume and .build
files: A .volume can have `Image=some.build`, and a .build can have
`Volume=some.volume:/some/volume`.
We solve this dependency cycle by prefilling resourceNames with all
image names from .build files before converting all the unit files.
This results in an issue for the test suite though: For .volume's
depending on *.image or *.build, we need to copy these additional
dependencies to the test's quadletDir, otherwise the test will fail.
This is necessary, because `handleImageSource()` actually needs to know
the image name defined in the referenced *.{build,image} file. It cannot
fall back on the default names, as it is done for networks or volumes,
for example.
Signed-off-by: Johannes Maibaum <jmaibaum@gmail.com>
14 lines
591 B
Plaintext
14 lines
591 B
Plaintext
## assert-podman-final-args-regex /.*/podman-e2e-.*/subtest-.*/quadlet
|
|
## assert-podman-args --tag=localhost/imagename
|
|
## assert-key-is "Unit" "After" "network-online.target"
|
|
## assert-key-is "Unit" "Wants" "network-online.target"
|
|
## assert-key-is "Unit" "RequiresMountsFor" "%t/containers"
|
|
## assert-key-is-regex "Service" "WorkingDirectory" "/.*/podman-e2e-.*/subtest-.*/quadlet"
|
|
## assert-key-is "Service" "Type" "oneshot"
|
|
## assert-key-is "Service" "RemainAfterExit" "yes"
|
|
## assert-key-is "Service" "SyslogIdentifier" "%N"
|
|
|
|
[Build]
|
|
ImageTag=localhost/imagename
|
|
SetWorkingDirectory=unit
|