FROM php:8.2-apache-bookworm # Install dependencies RUN apt-get update && apt-get install -y \ # GD deps libpng-dev \ libjpeg62-turbo-dev \ libfreetype6-dev \ libwebp-dev \ # IMAP deps (available cleanly on bookworm/bullseye) libc-client-dev \ libkrb5-dev \ libssl-dev \ # Other deps you had libonig-dev \ libxml2-dev \ libldap2-dev \ zip \ unzip \ && rm -rf /var/lib/apt/lists/* # Install GD RUN docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp \ && docker-php-ext-install -j$(nproc) gd # Install IMAP RUN docker-php-ext-configure imap --with-kerberos --with-imap-ssl \ && docker-php-ext-install -j$(nproc) imap # Install MySQL extensions RUN docker-php-ext-install -j$(nproc) pdo pdo_mysql mysqli \ && docker-php-ext-enable mysqli # Enable Apache Rewrite and set port RUN a2enmod rewrite \ && sed -i 's/80/7860/g' /etc/apache2/ports.conf /etc/apache2/sites-available/000-default.conf # Setup files WORKDIR /var/www/html COPY . . # Set permissions RUN chown -R www-data:www-data /var/www/html/bank-update || true # Link the Apache config COPY apache-config.conf /etc/apache2/sites-available/000-default.conf CMD ["apache2-foreground"]