test
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
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
This commit is contained in:
20
base-image-script/build-rootfs.sh
Normal file
20
base-image-script/build-rootfs.sh
Normal file
@@ -0,0 +1,20 @@
|
||||
#!/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"
|
||||
Reference in New Issue
Block a user