25 lines
679 B
Docker
25 lines
679 B
Docker
FROM php:8.3-apache
|
|
|
|
# Enable mod_rewrite
|
|
RUN a2enmod rewrite
|
|
|
|
# Install SQLite dev libs + PDO extension
|
|
RUN apt-get update && apt-get install -y libsqlite3-dev libzip-dev && rm -rf /var/lib/apt/lists/*
|
|
RUN docker-php-ext-install pdo_sqlite zip
|
|
|
|
# Set document root to public/
|
|
ENV APACHE_DOCUMENT_ROOT=/var/www/html/public
|
|
RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' \
|
|
/etc/apache2/sites-available/*.conf \
|
|
/etc/apache2/apache2.conf
|
|
|
|
# Allow .htaccess overrides
|
|
RUN sed -ri -e 's/AllowOverride None/AllowOverride All/g' \
|
|
/etc/apache2/apache2.conf
|
|
|
|
COPY . /var/www/html
|
|
|
|
COPY docker-entrypoint.sh /usr/local/bin/
|
|
EXPOSE 80
|
|
CMD ["docker-entrypoint.sh"]
|