LAMP-env

A Docker-based LAMP environment with two profiles:

Supported PHP versions

Version Status
PHP 8.4 Active support
PHP 8.3 Active support (default)
PHP 8.2 Security fixes only

All versions installed via ondrej/php PPA (dev) or LiteSpeed repo (prod).

Quick start (dev)

git clone https://github.com/jmcoimbra/LAMP-env.git
cd LAMP-env
cp .env.example .env
docker compose up -d

Place your projects in /var/www/. A folder named mysite becomes accessible at http://mysite.localhost/.

Quick start (prod)

cp .env.example .env
# Edit: set MARIADB_ROOT_PASSWORD and ACME_EMAIL
docker compose -f docker-compose.prod.yml up -d
./scripts/add-site.sh yourdomain.com

See the full Production guide.

Dev services

Service Details Port
Apache + PHP Ubuntu 24.04, mod_vhost_alias, mod_rewrite, mod_ssl 80, 443
MariaDB 11.4 LTS (configurable) 3306
dnsmasq Alpine-based, routes *.localhost to 127.0.0.1 53535

Source

github.com/jmcoimbra/LAMP-env