Apache2 (mpm_event) + PHP 5.3-8.5 via php-fpm over a unix socket, under supervisord
10K+
epicmorg/apache2Debian's Apache2 in front of our epicmorg/php
images. No mod_php: PHP runs as php-fpm, Apache talks to it through
mod_proxy_fcgi over the unix socket /run/php/php-fpm.sock, and
supervisord keeps both processes running.
FROM epicmorg/php:<ver> - one tag per PHP branch, php5.3 ... php8.5. All
PHP extensions, ionCube / phpBolt loaders and helper scripts
(php-ext-enable, phpenmod, ...) of the PHP image are there.mpm_event (prefork and worker disabled) and proxy_fcgi, ssl,
rewrite, headers, ldap / authnz_ldap, lua and friends enabled; extra
modules fcgid, xsendfile, encoding installed./etc/apache2/conf-enabled/php-fpm.conf), so every
vhost gets PHP. Default site: localhost, document root /var/www/html.${PHP_INI_DIR}/php-fpm.d/ (zz-apache.conf pins the socket)./etc/supervisor/conf.d/{php-fpm,apache2}.conf - drop
your own .conf next to them to run more processes.HEALTHCHECK: GET http://127.0.0.1/php-fpm-ping through Apache - checks
Apache and php-fpm at once.| Tags | Dockerfile |
|---|---|
php5.3 | php5.3 |
php5.4 | php5.4 |
php5.5 | php5.5 |
php5.6 | php5.6 |
php7.0 | php7.0 |
php7.1 | php7.1 |
php7.2 | php7.2 |
php7.3 | php7.3 |
php7.4 | php7.4 |
php8.0 | php8.0 |
php8.1 | php8.1 |
php8.2 | php8.2 |
php8.3 | php8.3 |
php8.4 | php8.4 |
php8.5 | php8.5 |
Every tag is pushed to docker.io, quay.io and ghcr.io (epicmorg/apache2:<tag> on each) - same digest everywhere.
Ports 80 and 443 are exposed; the container runs supervisord -n.
services:
websites:
image: epicmorg/apache2:php8.4
restart: unless-stopped
environment:
- FIX_WWW_DATA=false # true: chown -R www-data:www-data /var/www on start
ports:
- "80:80"
volumes:
- www:/var/www
tmpfs:
- /tmp
volumes:
www:
Downstream images replace the default site:
FROM epicmorg/apache2:php8.4
COPY etc/apache2/sites-available/mysite.conf /etc/apache2/sites-available/mysite.conf
RUN a2dissite localhost && a2ensite mysite && apachectl configtest
Each tag directory has its own README with the exact layout:
php8.4.
Content type
Image
Digest
sha256:1ee98a391…
Size
961.9 MB
Last updated
about 5 hours ago
docker pull epicmorg/apache2:php8.1