update
Some checks failed
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / build-rootfs-archives (push) Failing after 1m20s
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / push-archives-to-repo (push) Has been skipped
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / build-and-push-docker-images (push) Has been skipped
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. / generate-build-info (push) Has been skipped
Some checks failed
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / build-rootfs-archives (push) Failing after 1m20s
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / push-archives-to-repo (push) Has been skipped
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / build-and-push-docker-images (push) Has been skipped
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. / generate-build-info (push) Has been skipped
This commit is contained in:
37
base-image-script/debian-bullseye-pt1.sh
Normal file
37
base-image-script/debian-bullseye-pt1.sh
Normal file
@@ -0,0 +1,37 @@
|
||||
#!/bin/bash
|
||||
# Copyright (c) 2025 fithwum
|
||||
# All rights reserved
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
DEBIAN_RELEASE="bullseye"
|
||||
ROOTFS_DIR="debian-$DEBIAN_RELEASE"
|
||||
SCRIPTS_DIR="base-image-script"
|
||||
PT2_SCRIPT="debian-build-pt2.sh"
|
||||
PT3_SCRIPT="debian-build-pt3.sh"
|
||||
|
||||
echo "[INFO] Preparing environment..."
|
||||
apt-get update -y
|
||||
apt-get upgrade -y
|
||||
apt-get install -y --no-install-recommends debootstrap bash curl wget dirmngr bzip2
|
||||
|
||||
for SCRIPT in $PT2_SCRIPT $PT3_SCRIPT; do
|
||||
if [ ! -f "./$SCRIPTS_DIR/$SCRIPT" ]; then
|
||||
echo "[ERROR] Missing script: $SCRIPTS_DIR/$SCRIPT"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
echo "[INFO] Bootstrapping Debian $DEBIAN_RELEASE rootfs..."
|
||||
debootstrap --verbose --variant=minbase --components=main,contrib,non-free --include=apt,ca-certificates --arch=amd64 "$DEBIAN_RELEASE" "$ROOTFS_DIR" http://deb.debian.org/debian/
|
||||
|
||||
for dir in dev dev/pts proc sys; do
|
||||
mount --bind "/$dir" "$ROOTFS_DIR/$dir"
|
||||
done
|
||||
|
||||
cp "./$SCRIPTS_DIR/$PT2_SCRIPT" "$ROOTFS_DIR/root/$PT2_SCRIPT"
|
||||
chmod +x "$ROOTFS_DIR/root/$PT2_SCRIPT"
|
||||
|
||||
chroot "$ROOTFS_DIR" /root/$PT2_SCRIPT
|
||||
|
||||
bash "./$SCRIPTS_DIR/$PT3_SCRIPT" "$ROOTFS_DIR"
|
||||
Reference in New Issue
Block a user