From c950a72fc82b1949d130e677787ae964c09a13dd Mon Sep 17 00:00:00 2001 From: Frank John Begornia Date: Thu, 18 Dec 2025 14:05:22 +0800 Subject: [PATCH] Update Dockerfile to revert to PHP 7.0 and adjust Debian repository sources --- Dockerfile | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index f913dfc..c8fc22d 100755 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,18 @@ -# Use PHP 7.3 with Apache (compatible with Laravel 5.0) -FROM php:7.3-apache +# Use PHP 7.0 with Apache (has native mcrypt support for Laravel 5.0) +FROM php:7.0-apache + +# Update to use archived Debian repositories +RUN sed -i 's|deb.debian.org|archive.debian.org|g' /etc/apt/sources.list \ + && sed -i 's|security.debian.org|archive.debian.org|g' /etc/apt/sources.list \ + && sed -i '/stretch-updates/d' /etc/apt/sources.list # Install system dependencies -RUN apt-get update && apt-get install -y \ +RUN apt-get update && apt-get install -y --allow-unauthenticated \ git \ curl \ libpng-dev \ - libonig-dev \ libxml2-dev \ - libzip-dev \ + libmcrypt-dev \ zip \ unzip \ libfreetype6-dev \ @@ -17,13 +21,8 @@ RUN apt-get update && apt-get install -y \ && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \ && docker-php-ext-install -j$(nproc) gd -# Install PHP extensions -RUN docker-php-ext-install pdo_mysql mbstring exif pcntl bcmath zip tokenizer - -# Install mcrypt via PECL (required for Laravel 5.0) -RUN apt-get install -y libmcrypt-dev \ - && pecl install mcrypt-1.0.4 \ - && docker-php-ext-enable mcrypt +# Install PHP extensions (mcrypt is built-in for PHP 7.0) +RUN docker-php-ext-install pdo_mysql mbstring exif pcntl bcmath mcrypt tokenizer zip # Enable Apache mod_rewrite RUN a2enmod rewrite