mirror-coreos-chunkah/Containerfile.splitter
Jonathan Lebon 497884553b build: support oci: transport prefix on --output
It's silly right now how chunkah tars up an ocidir, but the primary
way this is consumed is by the containers stack, which will immediately
untar it back to consume it.

We can't avoid this in the `podman run | podman load` flow, but we can
in the Containerfile flow by simply leaving the output as an ocidir, and
then using `FROM oci:` instead of `FROM oci-archive:`.

To expose this, add support for transport prefixes on the argument
passed to `--output`; `oci:PATH` writes the OCI directory layout
directly to disk, while `oci-archive:PATH` or `PATH` preserves the
existing behavior.

Update `Containerfile.splitter` and docs to use the new format. And of
course, update the chunkah image build itself to use this!

Anyone using chunkah from a Containerfile is encouraged to switch over
to this. The efficiency gains are non-trivial. E.g. for the fedora-bootc
image, this roughly cuts in half the "handover time" from chunkah to
buildah.

Closes: #103

Assisted-by: Pi (Claude Opus 4.6)
2026-05-27 21:27:04 -04:00

16 lines
447 B
Text

# This file is used to split existing images using `buildah build`. See
# README.md for how to use it.
ARG CHUNKAH=quay.io/coreos/chunkah:latest
ARG CHUNKAH_ARGS=""
ARG CHUNKAH_CONFIG_STR
FROM overridden AS target
FROM ${CHUNKAH} AS chunkah
ARG CHUNKAH_CONFIG_STR
ARG CHUNKAH_ARGS
RUN --mount=type=bind,target=/run/src,rw \
--mount=from=target,target=/chunkah,ro \
chunkah build ${CHUNKAH_ARGS} --output oci:/run/src/out
FROM oci:out