18 lines
364 B
Docker
18 lines
364 B
Docker
# Use the official PHP image with Apache
|
|
FROM php:8.1-apache
|
|
|
|
# Install necessary PHP extensions
|
|
RUN docker-php-ext-install pdo pdo_mysql
|
|
|
|
# Enable Apache mod_rewrite
|
|
RUN a2enmod rewrite
|
|
|
|
# Set the working directory
|
|
WORKDIR /var/www/html
|
|
|
|
# Set permissions
|
|
RUN chown -R www-data:www-data /var/www/html
|
|
|
|
# Start Apache in the foreground
|
|
CMD ["apache2-foreground"]
|
|
|