Changed from Ubuntu 22 to Debian 12
This commit is contained in:
+17
-12
@@ -1,4 +1,4 @@
|
||||
FROM ubuntu:22.04
|
||||
FROM debian:12
|
||||
|
||||
# set container hostname and DN in case we don't set it on the docker build/run command
|
||||
ARG LDAP_HOST=example.com
|
||||
@@ -6,20 +6,25 @@ ENV LDAP_HOST=${LDAP_HOST}
|
||||
|
||||
# set non-interactive TERM for docker
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
#──────────────────────────────────────────────────────────────
|
||||
# install OpenLDAP, ldap-utils, and packages needed for ldapdock to work
|
||||
#──────────────────────────────────────────────────────────────
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
slapd ldap-utils gnutls-bin ssl-cert ca-certificates schema2ldif vim mc && apt-get clean
|
||||
|
||||
#──────────────────────────────────────────────────────────────
|
||||
# APACHE && PHP && neccesary related software
|
||||
# Install ALL necessary packages in a single run for minimal image size
|
||||
#──────────────────────────────────────────────────────────────
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
apache2 \
|
||||
php libapache2-mod-php \
|
||||
php-ldap php-mbstring php-xml php-curl php-intl wget \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
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
|
||||
&& apt-get update \
|
||||
# Install all packages, specifying PHP 8.1
|
||||
&& 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
|
||||
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Enable required Apache modules
|
||||
RUN a2enmod rewrite headers ssl
|
||||
|
||||
Reference in New Issue
Block a user