debian-forge-cli/entrypoint.sh
Michael Vogt f89342a1bd ibcli: use /var/cache/image-builder/store as default for --store
This commit follows a suggestion from Ondrej to add a better
default for `--store`: /var/cache/image-builder/store.

This is nice as it will give users automatic caching and makes
the container also nicer.
2024-12-19 11:35:15 +00:00

21 lines
610 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
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 "$@"