From 70238f2758ca9954df324fead272e21abe14f1e7 Mon Sep 17 00:00:00 2001 From: Philip Date: Mon, 26 Jan 2026 18:57:40 -0800 Subject: [PATCH] Update Dockerfile to install PHP extensions and configure --- Dockerfile | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1b2b319..3b41235 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1 +1,18 @@ -� \ No newline at end of file +FROM php:8.2-apache + +# Install necessary PHP extensions for MySQL and Image handling +RUN apt-get update && apt-get install -y \ + libpng-dev \ + libjpeg-dev \ + libfreetype6-dev \ + && docker-php-ext-configure gd --with-freetype --with-jpeg \ + && docker-php-ext-install -j$(nproc) gd pdo_mysql + +# Enable Apache mod_rewrite (useful for many PHP apps) +RUN a2enmod rewrite + +# Copy your source code into the container +COPY . /var/www/html/ + +# Set permissions +RUN chown -R www-data:www-data /var/www/html