FROM php:8.3-apache # Install system dependencies RUN apt-get update && apt-get install -y \ git \ curl \ libpng-dev \ libonig-dev \ libxml2-dev \ zip \ unzip \ libzip-dev \ && apt-get clean && rm -rf /var/lib/apt/lists/* # Install PHP extensions RUN docker-php-ext-install pdo_mysql mysqli mbstring exif pcntl bcmath gd zip # Enable Apache mod_rewrite RUN a2enmod rewrite # Enable Apache headers module RUN a2enmod headers # Copy custom Apache configuration COPY ./docker/apache/000-default.conf /etc/apache2/sites-available/000-default.conf # Install Composer COPY --from=composer:latest /usr/bin/composer /usr/bin/composer # Set working directory WORKDIR /var/www/html # Change ownership RUN chown -R www-data:www-data /var/www/html # Expose port 80 EXPOSE 80 # Start Apache CMD ["apache2-foreground"]