# Auto-generated by GitBlixt for WordPress FROM docker.io/wordpress:php8.3-apache # GitBlixt routes to port 4000 by default; make Apache listen there. RUN sed -i 's/Listen 80/Listen 4000/' /etc/apache2/ports.conf \ && sed -i 's/:80>/:4000>/' /etc/apache2/sites-available/000-default.conf # Permalink rewrite lives in the vhost, not .htaccess: the base image ships # AllowOverride None, so a committed .htaccess would be silently ignored. RUN a2enmod rewrite \ && printf '%s\n' \ '' \ ' AllowOverride All' \ ' Options FollowSymLinks' \ ' Require all granted' \ ' RewriteEngine On' \ ' RewriteBase /' \ ' RewriteRule ^index\.php$ - [L]' \ ' RewriteCond %{REQUEST_FILENAME} !-f' \ ' RewriteCond %{REQUEST_FILENAME} !-d' \ ' RewriteRule . /index.php [L]' \ '' > /etc/apache2/conf-available/wordpress-permalinks.conf \ && a2enconf wordpress-permalinks COPY . /var/www/html RUN chown -R www-data:www-data /var/www/html ENV PORT=4000 EXPOSE 4000 # The base image ENTRYPOINT (docker-entrypoint.sh) generates wp-config.php # from WORDPRESS_DB_* env vars (when one isn't committed) before running this. CMD ["apache2-foreground"]