# Use an official PHP runtime
FROM php:8.2-apache
# Prepare apt
RUN apt update && apt-get install -y libsqlite3-dev sqlite3
RUN docker-php-ext-install pdo_sqlite
# Prepare fake ssl certifikat
RUN apt install -y ssl-cert
# Setup Apache2 mod_ssl
# Enable SSL and necessary Apache modules
RUN a2enmod rewrite ssl proxy_fcgi setenvif
RUN a2ensite default-ssl
RUN usermod -aG sudo www-data
CMD ["apache2-foreground"]
# Install any extensions you need
# Set the working directory to /var/www/html
WORKDIR /var/www/html
# Copy the source code in /www into the container at /var/www/html
COPY ../www .