change how base image builds
Some checks failed
Build and Push Multi-Arch Docker Images / build (push) Has been cancelled
Some checks failed
Build and Push Multi-Arch Docker Images / build (push) Has been cancelled
This commit is contained in:
21
Dockerfile
Normal file
21
Dockerfile
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
FROM debian:bullseye
|
||||||
|
|
||||||
|
ARG VERSION
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
WORKDIR /builder
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
debootstrap wget curl bash ftp-upload dirmngr locales sudo git \
|
||||||
|
&& apt-get clean
|
||||||
|
|
||||||
|
# Setup locale
|
||||||
|
RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \
|
||||||
|
locale-gen && \
|
||||||
|
update-locale LANG=en_US.UTF-8
|
||||||
|
|
||||||
|
COPY base-image-script/ base-image-script/
|
||||||
|
|
||||||
|
RUN chmod +x base-image-script/*.sh
|
||||||
|
|
||||||
|
# Default command overridden by workflow
|
||||||
|
CMD ["bash"]
|
||||||
37
base-image-script/debian-bookworm_pt1.sh
Normal file
37
base-image-script/debian-bookworm_pt1.sh
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Copyright (c) 2025 fithwum
|
||||||
|
# All rights reserved
|
||||||
|
set -e
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
|
DEBIAN_RELEASE="bookworm"
|
||||||
|
ROOTFS_DIR="debian-${DEBIAN_RELEASE}"
|
||||||
|
SCRIPTS_DIR="base-image-script"
|
||||||
|
PT2_SCRIPT="debian-${DEBIAN_RELEASE}_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 --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"
|
||||||
21
base-image-script/debian-bookworm_pt2.sh
Normal file
21
base-image-script/debian-bookworm_pt2.sh
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Copyright (c) 2025 fithwum
|
||||||
|
# All rights reserved
|
||||||
|
echo "[CHROOT] Configuring Debian system..."
|
||||||
|
echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/10-assume_yes
|
||||||
|
|
||||||
|
apt-get update
|
||||||
|
apt-get upgrade
|
||||||
|
|
||||||
|
apt-get install --no-install-recommends software-properties-common bash wget curl nano locales
|
||||||
|
|
||||||
|
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
|
||||||
|
apt-get install -f
|
||||||
|
find /var/lib/apt/lists/ -type f -delete
|
||||||
|
|
||||||
|
echo "[CHROOT] Done. Type 'exit' to return."
|
||||||
|
exit
|
||||||
36
base-image-script/debian-build_pt3.sh
Normal file
36
base-image-script/debian-build_pt3.sh
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Copyright (c) 2025 fithwum
|
||||||
|
# All rights reserved
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Auto-detect a single debian-* directory if not passed
|
||||||
|
if [ -n "$1" ]; then
|
||||||
|
ROOTFS_DIR="$1"
|
||||||
|
else
|
||||||
|
ROOTFS_DIR=$(find . -maxdepth 1 -type d -name "debian-*" | sed 's|^\./||' | head -n 1)
|
||||||
|
if [ -z "$ROOTFS_DIR" ]; then
|
||||||
|
echo "[ERROR] No debian-* rootfs directory found!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
TARBALL="/output/${ROOTFS_DIR}.tar.bz2"
|
||||||
|
|
||||||
|
echo "[INFO] Unmounting system directories (ignore errors)..."
|
||||||
|
for dir in sys proc dev/pts dev; do
|
||||||
|
umount -lf "$ROOTFS_DIR/$dir" 2>/dev/null || true
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "[INFO] Removing chroot script..."
|
||||||
|
rm -f "$ROOTFS_DIR/root/${ROOTFS_DIR}_pt2.sh" 2>/dev/null || true
|
||||||
|
|
||||||
|
echo "[INFO] Rootfs size:"
|
||||||
|
du -sh "$ROOTFS_DIR"
|
||||||
|
|
||||||
|
echo "[INFO] Creating compressed base image..."
|
||||||
|
tar -cjf "$TARBALL" -C "$ROOTFS_DIR" .
|
||||||
|
|
||||||
|
echo "[INFO] Image archive size:"
|
||||||
|
du -sh "$TARBALL"
|
||||||
|
|
||||||
|
echo "[INFO] Tarball ready for CI to upload: $TARBALL"
|
||||||
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-${DEBIAN_RELEASE}_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 --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"
|
||||||
26
base-image-script/debian-bullseye_pt2.sh
Normal file
26
base-image-script/debian-bullseye_pt2.sh
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Copyright (c) 2025 fithwum
|
||||||
|
# All rights reserved
|
||||||
|
echo "[CHROOT] Configuring Debian system..."
|
||||||
|
echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/10-assume_yes
|
||||||
|
|
||||||
|
apt-get update
|
||||||
|
apt-get upgrade
|
||||||
|
|
||||||
|
apt-get install --no-install-recommends software-properties-common bash wget curl nano locales
|
||||||
|
|
||||||
|
echo "[CHROOT] Generating locales..."
|
||||||
|
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
|
||||||
|
locale-gen
|
||||||
|
update-locale LANG=en_US.UTF-8
|
||||||
|
|
||||||
|
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
|
||||||
|
apt-get install -f
|
||||||
|
find /var/lib/apt/lists/ -type f -delete
|
||||||
|
|
||||||
|
echo "[CHROOT] Done. Type 'exit' to return."
|
||||||
|
exit
|
||||||
37
base-image-script/debian-buster_pt1.sh
Normal file
37
base-image-script/debian-buster_pt1.sh
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Copyright (c) 2025 fithwum
|
||||||
|
# All rights reserved
|
||||||
|
set -e
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
|
DEBIAN_RELEASE="buster"
|
||||||
|
ROOTFS_DIR="debian-${DEBIAN_RELEASE}"
|
||||||
|
SCRIPTS_DIR="base-image-script"
|
||||||
|
PT2_SCRIPT="debian-${DEBIAN_RELEASE}_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 --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"
|
||||||
21
base-image-script/debian-buster_pt2.sh
Normal file
21
base-image-script/debian-buster_pt2.sh
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Copyright (c) 2025 fithwum
|
||||||
|
# All rights reserved
|
||||||
|
echo "[CHROOT] Configuring Debian system..."
|
||||||
|
echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/10-assume_yes
|
||||||
|
|
||||||
|
apt-get update
|
||||||
|
apt-get upgrade
|
||||||
|
|
||||||
|
apt-get install --no-install-recommends software-properties-common bash wget curl nano locales
|
||||||
|
|
||||||
|
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
|
||||||
|
apt-get install -f
|
||||||
|
find /var/lib/apt/lists/ -type f -delete
|
||||||
|
|
||||||
|
echo "[CHROOT] Done. Exiting."
|
||||||
|
exit
|
||||||
37
base-image-script/debian-docker-build_pt1.sh
Normal file
37
base-image-script/debian-docker-build_pt1.sh
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Copyright (c) 2025 fithwum
|
||||||
|
# All rights reserved
|
||||||
|
set -e
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
|
DEBIAN_RELEASE="docker-build"
|
||||||
|
ROOTFS_DIR="debian-${DEBIAN_RELEASE}"
|
||||||
|
SCRIPTS_DIR="base-image-script"
|
||||||
|
PT2_SCRIPT="debian-${DEBIAN_RELEASE}_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 --variant=minbase --components=main,contrib,non-free --include=apt,ca-certificates --arch=amd64 bookworm "$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"
|
||||||
37
base-image-script/debian-docker-build_pt2.sh
Normal file
37
base-image-script/debian-docker-build_pt2.sh
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Copyright (c) 2025 fithwum
|
||||||
|
# All rights reserved
|
||||||
|
echo "[CHROOT] Configuring Debian system..."
|
||||||
|
echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/10-assume_yes
|
||||||
|
|
||||||
|
apt-get update
|
||||||
|
apt-get upgrade
|
||||||
|
|
||||||
|
echo "[CHROOT] Installing Node.js..."
|
||||||
|
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
|
||||||
|
apt-get install --no-install-recommends nodejs
|
||||||
|
|
||||||
|
echo "[CHROOT] Installing Docker..."
|
||||||
|
apt-get install ca-certificates curl gnupg lsb-release
|
||||||
|
mkdir -p /etc/apt/keyrings
|
||||||
|
curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
|
||||||
|
echo \
|
||||||
|
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \
|
||||||
|
$(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
|
||||||
|
apt-get update
|
||||||
|
|
||||||
|
apt-get install --no-install-recommends docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
|
||||||
|
apt-get install --no-install-recommends software-properties-common bash wget curl nano python3 python3-pip python3-venv locales
|
||||||
|
|
||||||
|
dpkg -l | grep python3-cryptography || echo "[OK] Not installed"
|
||||||
|
|
||||||
|
echo "[CHROOT] Removing unnecessary packages..."
|
||||||
|
apt-get remove --purge --allow-remove-essential pinentry-curses whiptail dmidecode || true
|
||||||
|
|
||||||
|
echo "[CHROOT] Cleaning up..."
|
||||||
|
apt-get clean
|
||||||
|
apt-get install -f
|
||||||
|
find /var/lib/apt/lists/ -type f -delete
|
||||||
|
|
||||||
|
echo "[CHROOT] Done. Type 'exit' to return."
|
||||||
|
exit
|
||||||
48
base-image-script/debian-test_pt1.sh
Normal file
48
base-image-script/debian-test_pt1.sh
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Copyright (c) 2025 fithwum
|
||||||
|
# All rights reserved
|
||||||
|
set -e
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
|
DEBIAN_RELEASE="bookworm"
|
||||||
|
ROOTFS_DIR="debian-${DEBIAN_RELEASE}"
|
||||||
|
SCRIPTS_URL="https://gitea.fithwum.tech/fithwum/files-for-dockers/raw/branch/master/base-image-script/"
|
||||||
|
PT2_SCRIPT="debian-test_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 ftp-upload dirmngr
|
||||||
|
|
||||||
|
echo "[INFO] Downloading extra scripts if missing..."
|
||||||
|
for SCRIPT in $PT2_SCRIPT $PT3_SCRIPT; do
|
||||||
|
if [ ! -f "./$SCRIPT" ]; then
|
||||||
|
echo "[INFO] Downloading $SCRIPT..."
|
||||||
|
wget --no-cache "$SCRIPTS_URL/$SCRIPT" -O "./$SCRIPT"
|
||||||
|
chmod +x "./$SCRIPT"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "[INFO] Bootstrapping Debian $DEBIAN_RELEASE..."
|
||||||
|
debootstrap \
|
||||||
|
--variant=minbase \
|
||||||
|
--components=main,contrib,non-free \
|
||||||
|
--include=apt,ca-certificates \
|
||||||
|
--arch=amd64 \
|
||||||
|
"$DEBIAN_RELEASE" "$ROOTFS_DIR" http://deb.debian.org/debian/
|
||||||
|
|
||||||
|
echo "[INFO] Mounting system directories..."
|
||||||
|
for dir in dev dev/pts proc sys; do
|
||||||
|
mount --bind /$dir "$ROOTFS_DIR/$dir"
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "[INFO] Copying pt2 script into chroot..."
|
||||||
|
cp "./$PT2_SCRIPT" "$ROOTFS_DIR/root/$PT2_SCRIPT"
|
||||||
|
chmod +x "$ROOTFS_DIR/root/$PT2_SCRIPT"
|
||||||
|
|
||||||
|
echo "[INFO] Entering chroot. Type 'exit' when done."
|
||||||
|
chroot "$ROOTFS_DIR" /root/$PT2_SCRIPT
|
||||||
|
|
||||||
|
echo "[INFO] Running pt3 for packaging and upload..."
|
||||||
|
./$PT3_SCRIPT "$ROOTFS_DIR"
|
||||||
37
base-image-script/debian-test_pt2.sh
Normal file
37
base-image-script/debian-test_pt2.sh
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Copyright (c) 2025 fithwum
|
||||||
|
# All rights reserved
|
||||||
|
echo "[CHROOT] Configuring Debian system..."
|
||||||
|
echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/10-assume_yes
|
||||||
|
|
||||||
|
apt-get update
|
||||||
|
apt-get upgrade
|
||||||
|
|
||||||
|
echo "[CHROOT] Installing Node.js..."
|
||||||
|
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
|
||||||
|
apt-get install --no-install-recommends nodejs
|
||||||
|
|
||||||
|
echo "[CHROOT] Installing Docker..."
|
||||||
|
apt-get install ca-certificates curl gnupg lsb-release
|
||||||
|
mkdir -p /etc/apt/keyrings
|
||||||
|
curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
|
||||||
|
echo \
|
||||||
|
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \
|
||||||
|
$(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
|
||||||
|
apt-get update
|
||||||
|
|
||||||
|
apt-get install --no-install-recommends docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
|
||||||
|
apt-get install --no-install-recommends software-properties-common bash wget curl nano python3 python3-pip python3-venv locales
|
||||||
|
|
||||||
|
dpkg -l | grep python3-cryptography || echo "[OK] Not installed"
|
||||||
|
|
||||||
|
echo "[CHROOT] Removing unnecessary packages..."
|
||||||
|
apt-get remove --purge --allow-remove-essential pinentry-curses whiptail dmidecode || true
|
||||||
|
|
||||||
|
echo "[CHROOT] Cleaning up..."
|
||||||
|
apt-get clean
|
||||||
|
apt-get install -f
|
||||||
|
find /var/lib/apt/lists/ -type f -delete
|
||||||
|
|
||||||
|
echo "[CHROOT] Done. Type 'exit' to return."
|
||||||
|
exit
|
||||||
Reference in New Issue
Block a user