FROM php:8.3-apache # เปิดใช้งาน MySQLi และ PDO MySQL RUN docker-php-ext-install mysqli && \ docker-php-ext-enable mysqli && \ apt-get update && apt-get install -y libonig-dev && \ docker-php-ext-install mbstring && \ apt-get clean && rm -rf /var/lib/apt/lists/* # Set the working directory WORKDIR /var/www/html # Copy application files to the container COPY . /var/www/html/ # Grant appropriate permissions RUN chown -R www-data:www-data /var/www/html && \ chmod -R 755 /var/www/html # Enable Apache mod_rewrite RUN a2enmod rewrite # Expose port 80 EXPOSE 80 # Set the entrypoint to Apache CMD ["apache2-foreground"]