A minimal Docker-based PHP-FPM setup with runtime version switching and socket configuration. Ideal for local development and testing.
- 🔢 PHP version control via
__PHP_VERSION - 🔌 Unix socket at
/var/run/php/php<version>-fpm.sock - 🧩 Pre-installed extensions: PDO, mbstring, zip, gd
- 📦 Composer and 🐞 Xdebug included
- ⚙️ Configuration managed via templated files
__PHP_VERSION=8.3 make init
__PHP_VERSION=8.3 makemake init— 📁 Copies default configuration files to editable versionsmake— 🛠️ Builds and starts the containermake build— 🏗️ Builds the image onlymake up— 🚀 Starts the containermake down— ⛔ Stops and removes containers and orphansmake rebuild— ♻️ Rebuilds everything from scratchmake bash— 🐚 Opens a shell in the containermake logs— 📜 Tails container logs
📦 .
├── Dockerfile
├── Makefile
├── .env.example
├── docker-compose.yml
├── conf/
│ ├── php.default.ini
│ ├── www.conf.default.template
│ └── zz-docker.conf.default.template
- 📁 A Docker volume named
fpmsis used to store PHP FPM sockets - 🔄 You can change PHP versions dynamically using
__PHP_VERSIONwithout modifying any files