Small fixes from Ubuntu 22 -> Debian 12 switch

This commit is contained in:
Marisa 2025-12-18 07:25:02 -05:00
parent d3c54dd9bc
commit 162951d6dd

View File

@ -10,20 +10,20 @@ ENV DEBIAN_FRONTEND=noninteractive
#──────────────────────────────────────────────────────────────
# Install ALL necessary packages in a single run for minimal image size
#──────────────────────────────────────────────────────────────
RUN apt-get update && apt-get install -y --no-install-recommends gnupg lsb-release ca-certificates apt-transport-https software-properties-common wget \
# Add the repository for older PHP versions
&& wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg \
&& echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list \
# Update again to fetch packages from the new repository
RUN apt-get update && apt-get install -y --no-install-recommends gnupg lsb-release ca-certificates apt-transport-https software-properties-common wget curl \
# Add the Ondřej Surý PHP repository (modern Debian way)
&& wget -qO- https://packages.sury.org/php/apt.gpg | gpg --dearmor -o /usr/share/keyrings/sury-php-archive-keyring.gpg \
&& echo "deb [signed-by=/usr/share/keyrings/sury-php-archive-keyring.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list \
# Update package lists again to include the new PHP repo
&& apt-get update \
# Install all packages, specifying PHP 8.1
# Install all required packages, using PHP 8.1 from the Surý repo
&& apt-get install -y --no-install-recommends \
apt-utils \
slapd ldap-utils gnutls-bin ssl-cert schema2ldif vim mc \
apache2 \
php8.1 libapache2-mod-php8.1 \
php8.1-ldap php8.1-mbstring php8.1-xml php8.1-curl php8.1-intl \
# Clean up APT caches to reduce image size
# Clean up APT caches to keep the image small
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# Enable required Apache modules