# Use Debian 13 “Trixie” as base image FROM debian:trixie # Install ALL native packages from Debian 13 first RUN apt update && \ apt install -y \ # wkhtmltopdf prerequisites wget libfontenc1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils openssl build-essential libssl-dev libxrender-dev git-core libx11-dev libxext-dev libfontconfig1-dev libfreetype6-dev fontconfig \ \ # Apache + PHP + Utils poppler-utils apache2 curl cron unzip \ php8.4 php8.4-curl php8.4-cli php8.4-mysqli php8.4-gd php8.4-zip php8.4-dom php8.4-mbstring && \ \ # Install Composer curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer && \ \ # Clean up apt cache apt clean && rm -rf /var/lib/apt/lists/* # --- Now, install the old/insecure libraries for wkhtmltopdf --- RUN wget https://www.mytaxexpress.com/download/libssl1.1_1.1.1f-1ubuntu2.17_amd64.deb && \ dpkg -i libssl1.1_1.1.1f-1ubuntu2.17_amd64.deb RUN wget https://archive.debian.org/debian/pool/main/libj/libjpeg8/libjpeg8_8b-1_amd64.deb && \ dpkg -i libjpeg8_8b-1_amd64.deb # Finally, install wkhtmltopdf itself, forcing it over the broken dependencies RUN wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.stretch_amd64.deb && \ dpkg --force-all -i wkhtmltox_0.12.6-1.stretch_amd64.deb # Enable PHP in Apache2 and enable rewrite RUN a2enmod php8.4 \ && a2enmod rewrite # Set working directory and copy composer.json, then run composer install WORKDIR /var/www/html COPY ../../composer.json ./ RUN composer install --no-interaction # Expose port 80 and start Apache in foreground CMD ["apachectl", "-D", "FOREGROUND"]