Files
debian-base/base-image-script/build-rootfs.sh
fithwum edc3208c2e
Some checks failed
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / build-rootfs-per-version (push) Failing after 31s
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / generate-changelogs (push) Has been skipped
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / build-and-push-docker-images (push) Successful in 20s
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / generate-build-info (push) Successful in 20s
test
2025-07-10 07:55:18 -07:00

21 lines
597 B
Bash

#!/bin/bash
set -euo pipefail
VERSION="$1"
VOLUME="build_output_$VERSION"
echo "[INFO] Building rootfs for $VERSION"
docker volume create "$VOLUME"
docker build --build-arg VERSION="$VERSION" -t "fithwum/debian-$VERSION-base" .
docker run --rm --privileged -v "$VOLUME:/output" \
-e VERSION="$VERSION" \
"fithwum/debian-$VERSION-base" \
bash -c "/scripts/bootstrap-rootfs.sh \"$VERSION\""
container_id=$(docker create -v "$VOLUME:/output" debian)
mkdir -p "output/$VERSION"
docker cp "$container_id:/output/$VERSION/debian-$VERSION.tar.bz2" "output/$VERSION/"
docker rm "$container_id"