All-in-one Debian 13 stack: Apache, PHP 5.6-8.5, MariaDB, PostgreSQL, Redis, Mail, LDAP & FortiVPN.
1.5K
An all-in-one, highly configurable Docker image built on Debian 13 (Trixie), designed for web development and legacy-to-modern PHP testing environments. It bundles Apache, Multi-version PHP (5.6 to 8.5), MySQL 8.4.13, MariaDB 11.8.6, PostgreSQL 17.11 (with plpython3u & aws_s3), Redis (Standalone & Cluster), Mail Server (Postfix & Dovecot), OpenLDAP, and FortiVPN into a single container.
debian:13)5.6, 7.4, 8.0, 8.1, 8.2, 8.3, 8.4, 8.5
bcmath, cli, common, dev, fpm, gd, imap, intl, ldap, mbstring, mysql, xml, pgsql, zip, redis, mongodb, imagick, readline, igbinary, mailparse, opcache.8.4.1311.8.617.11 (pre-created plpython3u and aws_s3 extensions for Amazon S3 integration)7000–7005).slapd).openfortivpn) with built-in NAT & Port Forwarding support over ppp0.Services are disabled by default to save resources. Enable the exact services you need by passing a semicolon-separated list to the SERVICES_ON environment variable.
SERVICES_ON="apache2;php8.1-fpm;mysqld;mariadb;postgresql;slapd;redis-server;redis-server-cluster;postfix;dovecot;forti-vpn"
apache2php5.6-fpm, php7.4-fpm, php8.0-fpm, php8.1-fpm, php8.2-fpm, php8.3-fpm, php8.4-fpm, php8.5-fpmmysqld (MySQL v8.4.13)mariadb (v11.8.6)postgresql (v17.11)redis-serverredis-server-cluster (runs on ports 7000 to 7005)postfixdovecotslapd (OpenLDAP)forti-vpn (FortiGate SSL VPN Client)APACHE_VHOST is not set, Apache serves /var/www/ on ports 80 and 443.APACHE_ENV: Inject custom environment variables into Apache.
APACHE_ENV="APP_ENV=development;APP_DEBUG=true"APACHE_VHOST: Configure multiple VirtualHosts mapped to specific ports, PHP versions, and document roots using the format PORT:PHP_VER:DOC_ROOT.
APACHE_VHOST="8080:7.4:/var/www/legacy;8081:8.3:/var/www/modern"8.4.13) & MariaDB (11.8.6)| Variable | Description |
|---|---|
MYSQL_DB | Name of the database to create on startup. |
MYSQL_USER | Username for the database. |
MYSQL_PASSWORD | Password for the database user. |
17.11)plpython3u, aws_s3 (already enabled and ready to use).| Variable | Description |
|---|---|
POSTGRES_DB | Name of the database to create on startup. |
POSTGRES_USER | Username for the PostgreSQL database. |
POSTGRES_PASSWORD | Password for the PostgreSQL user. |
AWS_ACCESS_KEY_ID | (Optional) AWS Access Key ID required when using the aws_s3 extension. |
AWS_SECRET_ACCESS_KEY | (Optional) AWS Secret Access Key required when using the aws_s3 extension. |
redis-server).7000 through 7005 (redis-server-cluster).MAIL_USER: Create mail accounts using username:password pairs separated by semicolons.
MAIL_USER="admin:secret123;dev:devpass"MAIL_VIRTUAL_ALIAS: Configure virtual alias routing.
/^([^@]+)@.*/ ${1}@localhost (routes any domain to local users).MAIL_VIRTUAL_ALIAS="/@.*/ username" (routes all incoming emails to username).MAIL_POST_ALIAS: Pipe incoming emails for a specific user directly into a script or command.
MAIL_POST_ALIAS='username: "|xargs -0 /var/www/html/bash.sh"'slapd)| Variable | Description | Default |
|---|---|---|
LDAP_PW | Administrator password for LDAP. | - |
LDAP_DN | Base domain name for the LDAP tree. | nodomain |
LDAP_USER | Create LDAP users (username:password;username1:password1). | - |
LDAP_DN=example.com: uid=<username>,dc=example,dc=comnodomain: uid=<username>,dc=nodomainforti-vpn)| Variable | Description |
|---|---|
VPN_HOST | FortiGate VPN server hostname or IP (with port if needed, e.g., ://example.com). |
VPN_USER | Username for VPN authentication. |
VPN_PASS | Password for VPN authentication. |
VPN_CERT | (Optional) Trusted server certificate SHA256 fingerprint (trusted-cert). |
PORT_FORWARD | (Optional) Forward local container ports to internal VPN hosts using EXT_PORT:DEST_IP:DEST_PORT separated by semicolons (;). |
PORT_FORWARD="8022:192.168.2.100:22;8080:192.168.2.100:80" (forwards container port 8022 to 192.168.2.100:22 and 8080 to 192.168.2.100:80 via ppp0).127.0.0.1:<PORT>:<PORT>) in your docker run or docker-compose.yml so internal VPN services are not exposed publicly. Ensure privileged: true is enabled for ppp0 and iptables NAT routing.docker-compose.yml)version: '3.8'
services:
web-stack:
image: hoanghd/linux:latest
container_name: dev-all-in-one
privileged: true
stdin_open: true
tty: true
ports:
- "80:80"
- "443:443"
- "3306:3306"
- "5432:5432"
- "6379:6379"
- "25:25"
- "143:143"
- "389:389"
# Bind VPN forwarded ports strictly to 127.0.0.1 for security
- "127.0.0.1:8022:8022"
- "127.0.0.1:2222:2222"
environment:
# Use either 'mysqld' (MySQL 8.4.13) or 'mariadb' (MariaDB 11.8.6)
SERVICES_ON: "apache2;php7.4-fpm;php8.3-fpm;mysqld;postgresql;redis-server;postfix;dovecot;slapd;forti-vpn"
# Apache
APACHE_ENV: "APP_ENV=development;APP_DEBUG=true"
APACHE_VHOST: "80:8.3:/var/www/html;8080:7.4:/var/www/legacy"
# Databases
MYSQL_DB: "app_db"
MYSQL_USER: "db_user"
MYSQL_PASSWORD: "db_password"
POSTGRES_DB: "pg_db"
POSTGRES_USER: "pg_user"
POSTGRES_PASSWORD: "pg_password"
# Optional: AWS Credentials for PostgreSQL aws_s3 extension
AWS_ACCESS_KEY_ID: "your-access-key-id"
AWS_SECRET_ACCESS_KEY: "your-secret-access-key"
# Mail
MAIL_USER: "admin:admin123"
MAIL_VIRTUAL_ALIAS: "/@.*/ admin"
# LDAP
LDAP_PW: "adminpassword"
LDAP_DN: "example.com"
LDAP_USER: "jdoe:password123"
# FortiVPN
VPN_HOST: "://example.com"
VPN_USER: "vpn_user"
VPN_PASS: "vpn_password"
VPN_CERT: "your-trusted-cert-sha256"
PORT_FORWARD: "8022:192.168.2.100:22"
volumes:
- ./www:/var/www
- mysql:/var/lib/mysql:cached
- postgresql:/var/lib/postgresql/17/main:cached
volumes:
mysql:
postgresql:
docker pull hoanghd/linux:latest