450 B
450 B
FROM php:8.3-apache
WORKDIR /var/www/html
Install dependencies and extensions
RUN apt-get update && apt-get install -y
libzip-dev
&& docker-php-ext-install pdo pdo_mysql zip
&& docker-php-ext-enable pdo_mysql
Enable Apache mod_rewrite (Essential for most PHP frameworks/CMS)
RUN a2enmod rewrite
OPTIONAL: Copy your files into the image (for production builds)
COPY . /var/www/html/
EXPOSE 80
CMD ["apache2-foreground"]