FROM debian:12-slim RUN < /etc/apt/sources.list.d/php.list apt-get update apt-get install -y apache2 libapache2-mod-php${PHP_VERSION} msmtp \ php${PHP_VERSION}-cli php${PHP_VERSION}-opcache \ php${PHP_VERSION}-pgsql php${PHP_VERSION}-xml socat adduser --system --ingroup www-data \ --shell '/bin/false' \ --comment 'LWB5 Ticks' \ --home /opt/lwb5 --no-create-home \ lwticks for what in apache2 cli; do cat >/etc/php/${PHP_VERSION}/${what}/conf.d/99-smtp.ini < /etc/apache2/ports.conf cat > /etc/apache2/sites-available/lwb5-main.conf < ServerAdmin webmaster@localhost DocumentRoot /opt/lwb5/site ErrorLog /dev/stderr CustomLog /dev/stdout combined Require all granted php_flag log_errors on php_value error_log syslog Require all denied EOC cat > /etc/apache2/sites-available/lwb5-admin.conf < ServerAdmin webmaster@localhost DocumentRoot /opt/lwb5/admin ErrorLog /dev/stderr CustomLog /dev/stdout combined Require all granted php_flag log_errors on php_value error_log syslog Require all denied EOC a2dissite 000-default a2ensite lwb5-main a2ensite lwb5-admin mkdir /var/spool/pgen chgrp www-data /var/spool/pgen chmod 1775 /var/spool/pgen EOF VOLUME /var/spool/pgen EXPOSE 80 81 ADD game /opt/lwb5 ENTRYPOINT ["/opt/lwb5/run-lwb5.sh"]