# Use the official PHP 5.6 image from the Docker Hub
FROM php:5.6-apache

# Install PHP extensions and other necessary packages
RUN docker-php-ext-install mysqli pdo pdo_mysql

# Enable Apache mod_rewrite
RUN a2enmod rewrite

# Copy application source code to the Apache document root
COPY . /var/www/html/

# Set the working directory
WORKDIR /var/www/html

# Set permissions for the www-data user
RUN chown -R www-data:www-data /var/www/html

# Expose port 80
EXPOSE 80

