Add: Dockerized Apache2

This commit is contained in:
Luca 2022-03-01 15:41:08 +01:00
commit 2b0d55a4b6
5 changed files with 61 additions and 0 deletions

12
Dockerfile Normal file
View File

@ -0,0 +1,12 @@
FROM registry.sindominio.net/debian
RUN apt-get update && \
apt-get -qy install apache2 && \
apt-get clean
RUN a2enmod alias proxy proxy_fcgi
EXPOSE 8000
ADD start.sh .
CMD "/start.sh"

View File

@ -0,0 +1,18 @@
<VirtualHost *:80>
ServerName default
DocumentRoot /var/www/html
<Directory /var/www/html>
Options -Indexes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
<FilesMatch \.php$>
# 2.4.10+ can proxy to unix socket
SetHandler "proxy:fcgi://localhost:9000"
</FilesMatch>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

17
conf/envvars Normal file
View File

@ -0,0 +1,17 @@
unset HOME
if [ "${APACHE_CONFDIR##/etc/apache2-}" != "${APACHE_CONFDIR}" ] ; then
SUFFIX="-${APACHE_CONFDIR##/etc/apache2-}"
else
SUFFIX=
fi
export APACHE_RUN_USER=www-data
export APACHE_RUN_GROUP=www-data
export APACHE_PID_FILE=/tmp/apache2$SUFFIX/apache2.pid
export APACHE_RUN_DIR=/tmp/apache2$SUFFIX
export APACHE_LOCK_DIR=/tmp/apache2$SUFFIX
export APACHE_LOG_DIR=/tmp/apache2$SUFFIX
export LANG=C
export LANG

10
docker-compose.yml Normal file
View File

@ -0,0 +1,10 @@
version: "3"
services:
apache2:
build: .
user: "1000:1000"
ports:
- 8088:80
volumes:
- ./conf/envvars:/etc/apache2/envvars:ro
- ./conf/apache-wordpress.conf:/etc/apache2/sites-available/000-default.conf:ro

4
start.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/bash
apache2ctl start
tail -f /tmp/apache2/*log