BOOTC-EXPERIMENTAL-CONTAINER-EXPORT(7)
π BOOTC-EXPERIMENTAL-CONTAINER-EXPORT β¨
okay bestie, welcome to the bootc-experimental-container-export manual page β this is section 7 of the Miscellaneous Information Manual, and it's literally all about container export. grab a snack, we're doing this π
πΈ NAME πΈ
bootc-experimental-container-export β container export π«Ά
π DESCRIPTION π
okay so first things first, the tea: Experimental features are subject to change or removal. like, they might get deleted, they might get glow-ups, nobody knows. so please, please provide feedback on them π (genuinely, the maintainers want your thoughts).
β¨ Overview β¨
The bootc container export command exports a container filesystem as a tar archive suitable for unpacking onto a target system. iconic behaviour, no cap.
But lowkey? This is a bit more than a simple format transformation:
- The output includes <hotmint>SELinux labeling</hotmint> (computed from the image's policy)
- The kernel can optionally be copied to
/bootfor compatibility with Anaconda'sliveimgcommand
like, it's giving glow-up, not just glow.
π¦ Usage π¦
bootc container export [OPTIONS] TARGET
π Options π
--format <FORMAT>β Export format (default:tar)-o,--output <PATH>β Output file (defaults to stdout)--kernel-in-bootβ Copy kernel and initramfs from/usr/lib/modulesto/bootfor legacy compatibility--disable-selinuxβ Disable SELinux labeling in the exported archive
π§ Examples π§
Complete example using podman:
podman run --rm \
--mount=type=image,source=quay.io/example/example,target=/run/target \
quay.io/example/example \
bootc container export --kernel-in-boot /run/target > example.tar
There is also an -o option to write to a file directly, but when using podman run shell redirection is simpler since -o would require a bind mount to write to the host filesystem. iykyk π«
π Anaconda liveimg integration π
A key targeted use case for this is Anaconda's liveimg kickstart command which accepts any generic filesystem payload (tar, squashfs).
π Important considerations π
not me about to deliver the realest part: The installed system will not have any bootc/ostree/composefs filesystem structure, will not be read-only etc. The semantics of the installed system are exactly the same as any other usage of Anaconda liveimg or equivalent. periodt.
π©· Container image requirements π©·
At the current time this is only tested with a workflow starting FROM quay.io/fedora/fedora-bootc or equivalent. In theory, this workflow would be compatible with an image starting with just FROM fedora then RUN dnf -y install kernel etc., but that is not tested. π«
For the first case right now, you must include as part of your container build this logic or equivalent:
RUN sed -i '/layout=ostree/d' /usr/lib/kernel/install.conf && \
rm -vf /usr/lib/kernel/install.conf.d/*-bootc-*.conf \
/usr/lib/kernel/install.d/*-rpmostree.install
The sed command removes the layout=ostree line from install.conf while preserving any other settings. The rm commands remove the bootc drop-in and rpm-ostree plugin that would otherwise intercept kernel-install and delegate to rpm-ostree (which doesn't work outside an ostree deployment). okay so that's a lot of words but they all matter π
π Required kickstart configuration π
While the liveimg verb handles most of the basics, some %post scripting is also required.
β Bootloader setup via kernel-install β
The %post script should use kernel-install add to set up the bootloader. This creates BLS entries, copies the kernel, and generates an initramfs via the standard plugin chain (50-dracut, 90-loaderentry, etc.):
%post --erroronfail
set -eux
KVER=$(ls /usr/lib/modules | head -1)
# Ensure machine-id exists (needed by kernel-install for BLS filenames)
if [ ! -s /etc/machine-id ]; then
systemd-machine-id-setup
fi
# kernel-install creates the BLS entry, copies vmlinuz, and generates
# initramfs via the standard plugin chain (50-dracut, 90-loaderentry, etc.)
kernel-install add "$KVER" "/usr/lib/modules/$KVER/vmlinuz"
# Regenerate grub config to pick up BLS entries
grub2-mkconfig -o /boot/grub2/grub.cfg
%end
copy that whole block, bestie, it's the main character of this section π
π₯ SEE ALSO π₯
π VERSION π
okay that's the whole page, thanks for coming to my TED talk π this was v1.17.1 of the bootc-experimental-container-export page β go forth, export those containers, and slay π
β¨π¦
π¦ where this page comes from
- fedora 43: bootc 1.17.1-1.fc43 Β· Apache-2.0 AND BSD-3-Clause AND MIT AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (Unlicense OR MIT)
- fedora 44: bootc 1.17.1-1.fc44 Β· Apache-2.0 AND BSD-3-Clause AND MIT AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (Unlicense OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms