debian-forge-cli/entrypoint.sh
Michael Vogt e7d8a39fcf test: add minimal test for container based building of images
This commit adds a smoke test that builds the ibcli container
and runs a fedora-41 raw-minimal build to double check that
the container based building actually works.

Thanks to Ondrej for suggesting this.
2024-12-19 08:49:26 +00:00

22 lines
650 B
Bash
Executable file

#!/bin/sh
set -e
# TODO: share code with bib to do the setup automatically
# see https://github.com/teamsbc/container-for-osbuild/blob/main/entrypoint.bash (thanks simon)
# and https://github.com/osbuild/bootc-image-builder/blob/main/bib/internal/setup/setup.go#L21 (thanks ondrej,achilleas,colin)
mkdir /run/osbuild
mkdir /run/osbuild-store
mount -t tmpfs tmpfs /run/osbuild
cp -p /usr/bin/osbuild /run/osbuild/osbuild
chcon system_u:object_r:install_exec_t:s0 /run/osbuild/osbuild
mount -t devtmpfs devtmpfs /dev
mount --bind /run/osbuild/osbuild /usr/bin/osbuild
# XXX: make this nicer
cd /output
/usr/bin/image-builder --store=/store "$@"