FROM php:8.3-apache # 1. Install system dependencies (Git, Unzip, Cron) RUN apt-get update && apt-get install -y \ git \ unzip \ libzip-dev \ cron \ && docker-php-ext-install zip pdo pdo_mysql # 2. Install Composer globally COPY --from=composer:latest /usr/bin/composer /usr/bin/composer # 3. Enable Apache mod_rewrite RUN a2enmod rewrite # 4. Copy the entrypoint script and make it executable COPY docker-entrypoint.sh /usr/local/bin/ RUN chmod +x /usr/local/bin/docker-entrypoint.sh # 5. Set working directory WORKDIR /var/www/html # 6. Set Entrypoint ENTRYPOINT ["docker-entrypoint.sh"] # 7. Default command CMD ["apache2-foreground"]