mirror of
https://github.com/dockersrc/debian
synced 2026-06-30 17:45:56 -04:00
🔧 Fix apt sources and add ca-certificates across Debian versions 🔧
- Add ca-certificates to PACK_LIST in all four Dockerfiles (10-13) - Explicitly write apt sources.list for each Debian release (buster, bullseye, bookworm, trixie) with contrib and non-free components - Remove conflicting sources.list.d/*.sources files before writing new sources - Add Acquire::Check-Valid-Until false for buster archive to bypass expired release date check Dockerfile.10 Dockerfile.11 Dockerfile.12 Dockerfile.13
This commit is contained in:
+6
-3
@@ -55,7 +55,7 @@ ARG PHP_SERVER
|
|||||||
ARG SHELL_OPTS
|
ARG SHELL_OPTS
|
||||||
ARG DEBIAN_FRONTEND
|
ARG DEBIAN_FRONTEND
|
||||||
|
|
||||||
ARG PACK_LIST="bash-completion git curl wget sudo unzip tini xz-utils iproute2 pinentry-curses bsd-mailx procps net-tools bsd-mailx postfix python3-icu python3-pip certbot jq "
|
ARG PACK_LIST="bash-completion git curl wget sudo unzip tini xz-utils iproute2 pinentry-curses bsd-mailx procps net-tools bsd-mailx postfix python3-icu python3-pip certbot ca-certificates jq "
|
||||||
|
|
||||||
ENV ENV=~/.profile
|
ENV ENV=~/.profile
|
||||||
ENV SHELL="/bin/sh"
|
ENV SHELL="/bin/sh"
|
||||||
@@ -75,8 +75,11 @@ RUN set -e; \
|
|||||||
echo "Setting up prerequisites"; \
|
echo "Setting up prerequisites"; \
|
||||||
echo "$LANG UTF-8" >"/etc/locale.gen"; \
|
echo "$LANG UTF-8" >"/etc/locale.gen"; \
|
||||||
echo 'export DEBIAN_FRONTEND="'${DEBIAN_FRONTEND}'"' >"/etc/profile.d/apt.sh" && chmod 755 "/etc/profile.d/apt.sh"; \
|
echo 'export DEBIAN_FRONTEND="'${DEBIAN_FRONTEND}'"' >"/etc/profile.d/apt.sh" && chmod 755 "/etc/profile.d/apt.sh"; \
|
||||||
echo "deb http://archive.debian.org/debian buster main" > /etc/apt/sources.list; \
|
rm -f /etc/apt/sources.list.d/*.sources 2>/dev/null || true; \
|
||||||
echo "deb http://archive.debian.org/debian-security buster/updates main" >> /etc/apt/sources.list; \
|
echo 'Acquire::Check-Valid-Until "false";' > /etc/apt/apt.conf.d/99archive-release; \
|
||||||
|
printf '%s\n' \
|
||||||
|
"deb http://archive.debian.org/debian buster main contrib non-free" \
|
||||||
|
"deb http://archive.debian.org/debian-security buster/updates main contrib non-free" > /etc/apt/sources.list; \
|
||||||
apt update && apt install -yy bash locales apt-utils; \
|
apt update && apt install -yy bash locales apt-utils; \
|
||||||
locale-gen $LANG && update-locale LANG=$LANG; \
|
locale-gen $LANG && update-locale LANG=$LANG; \
|
||||||
update-alternatives --install /bin/sh sh /bin/bash 1
|
update-alternatives --install /bin/sh sh /bin/bash 1
|
||||||
|
|||||||
+6
-1
@@ -55,7 +55,7 @@ ARG PHP_SERVER
|
|||||||
ARG SHELL_OPTS
|
ARG SHELL_OPTS
|
||||||
ARG DEBIAN_FRONTEND
|
ARG DEBIAN_FRONTEND
|
||||||
|
|
||||||
ARG PACK_LIST="bash-completion git curl wget sudo unzip tini xz-utils iproute2 pinentry-curses bsd-mailx procps net-tools bsd-mailx postfix python3-icu python3-pip certbot jq "
|
ARG PACK_LIST="bash-completion git curl wget sudo unzip tini xz-utils iproute2 pinentry-curses bsd-mailx procps net-tools bsd-mailx postfix python3-icu python3-pip certbot ca-certificates jq "
|
||||||
|
|
||||||
ENV ENV=~/.profile
|
ENV ENV=~/.profile
|
||||||
ENV SHELL="/bin/sh"
|
ENV SHELL="/bin/sh"
|
||||||
@@ -75,6 +75,11 @@ RUN set -e; \
|
|||||||
echo "Setting up prerequisites"; \
|
echo "Setting up prerequisites"; \
|
||||||
echo "$LANG UTF-8" >"/etc/locale.gen"; \
|
echo "$LANG UTF-8" >"/etc/locale.gen"; \
|
||||||
echo 'export DEBIAN_FRONTEND="'${DEBIAN_FRONTEND}'"' >"/etc/profile.d/apt.sh" && chmod 755 "/etc/profile.d/apt.sh"; \
|
echo 'export DEBIAN_FRONTEND="'${DEBIAN_FRONTEND}'"' >"/etc/profile.d/apt.sh" && chmod 755 "/etc/profile.d/apt.sh"; \
|
||||||
|
rm -f /etc/apt/sources.list.d/*.sources 2>/dev/null || true; \
|
||||||
|
printf '%s\n' \
|
||||||
|
"deb http://deb.debian.org/debian bullseye main contrib non-free" \
|
||||||
|
"deb http://deb.debian.org/debian bullseye-updates main contrib non-free" \
|
||||||
|
"deb http://security.debian.org/debian-security bullseye-security main contrib non-free" > /etc/apt/sources.list; \
|
||||||
apt update && apt install -yy bash locales apt-utils python3-tz; \
|
apt update && apt install -yy bash locales apt-utils python3-tz; \
|
||||||
dpkg-reconfigure --frontend=noninteractive locales;update-locale LANG=$LANG; \
|
dpkg-reconfigure --frontend=noninteractive locales;update-locale LANG=$LANG; \
|
||||||
update-alternatives --install /bin/sh sh /bin/bash 1
|
update-alternatives --install /bin/sh sh /bin/bash 1
|
||||||
|
|||||||
+6
-1
@@ -55,7 +55,7 @@ ARG PHP_SERVER
|
|||||||
ARG SHELL_OPTS
|
ARG SHELL_OPTS
|
||||||
ARG DEBIAN_FRONTEND
|
ARG DEBIAN_FRONTEND
|
||||||
|
|
||||||
ARG PACK_LIST="bash-completion git curl wget sudo unzip tini xz-utils iproute2 pinentry-curses bsd-mailx procps net-tools bsd-mailx postfix python3-icu python3-pip certbot jq "
|
ARG PACK_LIST="bash-completion git curl wget sudo unzip tini xz-utils iproute2 pinentry-curses bsd-mailx procps net-tools bsd-mailx postfix python3-icu python3-pip certbot ca-certificates jq "
|
||||||
|
|
||||||
ENV ENV=~/.profile
|
ENV ENV=~/.profile
|
||||||
ENV SHELL="/bin/sh"
|
ENV SHELL="/bin/sh"
|
||||||
@@ -75,6 +75,11 @@ RUN set -e; \
|
|||||||
echo "Setting up prerequisites"; \
|
echo "Setting up prerequisites"; \
|
||||||
echo "$LANG UTF-8" >"/etc/locale.gen"; \
|
echo "$LANG UTF-8" >"/etc/locale.gen"; \
|
||||||
echo 'export DEBIAN_FRONTEND="'${DEBIAN_FRONTEND}'"' >"/etc/profile.d/apt.sh" && chmod 755 "/etc/profile.d/apt.sh"; \
|
echo 'export DEBIAN_FRONTEND="'${DEBIAN_FRONTEND}'"' >"/etc/profile.d/apt.sh" && chmod 755 "/etc/profile.d/apt.sh"; \
|
||||||
|
rm -f /etc/apt/sources.list.d/*.sources 2>/dev/null || true; \
|
||||||
|
printf '%s\n' \
|
||||||
|
"deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware" \
|
||||||
|
"deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware" \
|
||||||
|
"deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware" > /etc/apt/sources.list; \
|
||||||
apt update && apt install -yy bash locales apt-utils; \
|
apt update && apt install -yy bash locales apt-utils; \
|
||||||
locale-gen $LANG && update-locale LANG=$LANG; \
|
locale-gen $LANG && update-locale LANG=$LANG; \
|
||||||
update-alternatives --install /bin/sh sh /bin/bash 1
|
update-alternatives --install /bin/sh sh /bin/bash 1
|
||||||
|
|||||||
+6
-1
@@ -55,7 +55,7 @@ ARG PHP_SERVER
|
|||||||
ARG SHELL_OPTS
|
ARG SHELL_OPTS
|
||||||
ARG DEBIAN_FRONTEND
|
ARG DEBIAN_FRONTEND
|
||||||
|
|
||||||
ARG PACK_LIST="bash-completion git curl wget sudo unzip tini xz-utils iproute2 pinentry-curses bsd-mailx procps net-tools bsd-mailx postfix python3-icu python3-pip certbot jq "
|
ARG PACK_LIST="bash-completion git curl wget sudo unzip tini xz-utils iproute2 pinentry-curses bsd-mailx procps net-tools bsd-mailx postfix python3-icu python3-pip certbot ca-certificates jq "
|
||||||
|
|
||||||
ENV ENV=~/.profile
|
ENV ENV=~/.profile
|
||||||
ENV SHELL="/bin/sh"
|
ENV SHELL="/bin/sh"
|
||||||
@@ -75,6 +75,11 @@ RUN set -e; \
|
|||||||
echo "Setting up prerequisites"; \
|
echo "Setting up prerequisites"; \
|
||||||
echo "$LANG UTF-8" >"/etc/locale.gen"; \
|
echo "$LANG UTF-8" >"/etc/locale.gen"; \
|
||||||
echo 'export DEBIAN_FRONTEND="'${DEBIAN_FRONTEND}'"' >"/etc/profile.d/apt.sh" && chmod 755 "/etc/profile.d/apt.sh"; \
|
echo 'export DEBIAN_FRONTEND="'${DEBIAN_FRONTEND}'"' >"/etc/profile.d/apt.sh" && chmod 755 "/etc/profile.d/apt.sh"; \
|
||||||
|
rm -f /etc/apt/sources.list.d/*.sources 2>/dev/null || true; \
|
||||||
|
printf '%s\n' \
|
||||||
|
"deb http://deb.debian.org/debian trixie main contrib non-free non-free-firmware" \
|
||||||
|
"deb http://deb.debian.org/debian trixie-updates main contrib non-free non-free-firmware" \
|
||||||
|
"deb http://security.debian.org/debian-security trixie-security main contrib non-free non-free-firmware" > /etc/apt/sources.list; \
|
||||||
apt update && apt install -yy bash locales apt-utils; \
|
apt update && apt install -yy bash locales apt-utils; \
|
||||||
locale-gen $LANG && update-locale LANG=$LANG; \
|
locale-gen $LANG && update-locale LANG=$LANG; \
|
||||||
update-alternatives --install /bin/sh sh /bin/bash 1
|
update-alternatives --install /bin/sh sh /bin/bash 1
|
||||||
|
|||||||
Reference in New Issue
Block a user