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
21 lines
597 B
Bash
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"
|