# Use the official PHP image with Apache FROM php:8.2-apache # Install required PHP extensions and dependencies RUN apt-get update && apt-get install -y \ wget \ mariadb-client \ unzip \ libzip-dev \ && docker-php-ext-install mysqli pdo pdo_mysql zip \ && docker-php-ext-enable mysqli pdo pdo_mysql zip \ && apt-get clean && rm -rf /var/lib/apt/lists/* # Enable Apache modules RUN a2enmod rewrite # Download and extract phpBB WORKDIR /var/www/html RUN wget https://github.com/phpbb/phpbb/archive/refs/tags/release-3.3.15.zip && \ unzip *.zip && \ rm *.zip # Set up folder structure RUN mv phpbb-release-*/* . && \ rm -rf phpbb-release-*/ && \ mv phpBB* phpbb # Run composer dependencies WORKDIR /var/www/html/phpbb RUN php ../composer.phar install # Set permissions WORKDIR /var/www/html RUN chown -R www-data:www-data /var/www/html/phpbb && \ chmod -R 755 /var/www/html/phpbb # Expose Apache port EXPOSE 80 CMD ["apache2-foreground"]