diff --git a/base-image-script/debian-test_pt1.sh b/base-image-script/debian-test_pt1.sh index 54e2deb..18bd909 100644 --- a/base-image-script/debian-test_pt1.sh +++ b/base-image-script/debian-test_pt1.sh @@ -26,7 +26,7 @@ echo "[INFO] Bootstrapping Debian $DEBIAN_RELEASE..." debootstrap \ --variant=minbase \ --components=main,contrib,non-free \ - --include=ca-certificates,software-properties-common,bash,wget,curl,nano,python3,python3-cryptography,locales \ + --include=ca-certificates,software-properties-common,bash,wget,curl,nano,python3,locales \ --arch=amd64 \ "$DEBIAN_RELEASE" "$ROOTFS_DIR" http://deb.debian.org/debian/ diff --git a/base-image-script/debian-test_pt2.sh b/base-image-script/debian-test_pt2.sh index e3ad7b4..cb1d1a4 100644 --- a/base-image-script/debian-test_pt2.sh +++ b/base-image-script/debian-test_pt2.sh @@ -1,4 +1,18 @@ #!/bin/bash +set -e + +export DEBIAN_FRONTEND=noninteractive + +echo "[CHROOT] Updating apt and setting locale..." +apt-get update +apt-get install -y locales +echo "en_US.UTF-8 UTF-8" > /etc/locale.gen +locale-gen +export LANG=en_US.UTF-8 + +echo "[CHROOT] Installing python3-cryptography safely..." +apt-get install -y python3-cryptography + echo "[CHROOT] Configuring Debian system..." echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/10-assume_yes @@ -10,9 +24,10 @@ echo "[CHROOT] Removing unnecessary packages..." apt-get remove --purge --allow-remove-essential pinentry-curses whiptail kmod iptables iproute2 dmidecode || true echo "[CHROOT] Cleaning up..." -apt-get clean +dpkg --configure -a apt-get install -f -find /var/lib/apt/lists/ -type f -delete +apt-get clean +rm -rf /var/lib/apt/lists/* echo "[CHROOT] Done. Type 'exit' to return." exit