Fine-tuned php-fpm with additional extensions
10K+
Base image for PHP development.
Development purposes only.
This image does a number of things that are convenient locally but are unsafe for production (for example, PHP-FPM runs as root).
| Path | Purpose |
|---|---|
legacy/ | Unmaintained / EOL PHP versions. Dockerfiles here may be edited by hand when something needs a fix. |
out/ | Generated Dockerfiles and assets for maintained PHP versions. Do not edit manually; change templates and config.yaml, then regenerate. |
skeletons/ | Jinja2 templates (*.template) and shared assets used to produce out/. |
config.yaml | Maps each published tag (e.g. 8.4, 8.4-xdebug) to a skeleton and variables. The out: list is what gets built; inactive: keeps older definitions for reference. |
Readme.md | This file. |
Templates are rendered with Jinja2 (via the m4x0nus/multiplicator image in CI).
out/ (generated)Dockerfiles under out/ are generated automatically. Do not edit them by hand. Edit skeletons/ and config.yaml, then regenerate (see below).
config.yaml: add or adjust entries under out: (keep versions in descending order, as noted in the file).master so Bitbucket Pipelines regenerates out/, commits, and triggers your external build hook.out/ locallyFrom the repository root (with config.yaml present):
docker run --rm -u "$(id -u "${USER}")":"$(id -g "${USER}")" -v "${PWD}:/data" m4x0nus/multiplicator update -d /data -c /data/config.yaml
CI runs the same updater from m4x0nus/multiplicator with python3 /app/main.py update -d ${PWD} against the repo root.
Only legacy/ — old PHP lines that are no longer generated from out/.
Build from the directory for that tag, not the repo root (each tag has its own Dockerfile and context files).
docker build -t aheadworks/phpdev:8.2 ./out/8.2
Xdebug variants are separate generated directories (Xdebug is baked in at template time, not toggled with a build-arg):
docker build -t aheadworks/phpdev:8.2-xdebug ./out/8.2-xdebug
These match the ARG / ENV blocks in the generated Dockerfiles (defaults shown).
| Build arg | Default | Notes |
|---|---|---|
FPM_USER | root | Written into www.conf at build time. |
FPM_GROUP | root | Same. |
PHP_MEMORY_LIMIT | 2048M | memory_limit ini. |
XDEBUG_IDEKEY | PHPSTORM | Xdebug 3. |
XDEBUG_MODE | debug | Xdebug 3. |
XDEBUG_CLIENT_PORT | 9001 | DBGp listener port. |
XDEBUG_DISCOVER_CLIENT_HOST | 1 | Set to 0 on Docker Desktop (Mac/Windows) if discovery misbehaves; see below. |
XDEBUG_CLIENT_HOST is set in the image to host.docker.internal for IDE connectivity from the container.
php:*-fpm-alpine base)serve mode)composer:2 image)*-xdebug tags)Default command starts cron, nginx on port 80, and PHP-FPM (typically 9000 inside the container).
docker run -p 80:80 aheadworks/phpdev:8.2
Any other arguments are executed as a command (after the entrypoint’s host-route helper), for example:
docker run --rm aheadworks/phpdev:8.2 uname -a
Older Xdebug 2 “remote connect back” settings do not apply to Xdebug 3.
If the IDE does not attach, turn off client discovery so Xdebug relies on the fixed client host (host.docker.internal in the image). The xdebug ini is written to read these from the environment, so you can override at run time:
docker run -e XDEBUG_DISCOVER_CLIENT_HOST=0 -p 80:80 aheadworks/phpdev:8.2-xdebug
To bake a different default into the image, rebuild with --build-arg XDEBUG_DISCOVER_CLIENT_HOST=0.
Ensure your IDE listens on the same port as XDEBUG_CLIENT_PORT (default 9001).
Content type
Image
Digest
sha256:86a67f1ad…
Size
79.5 MB
Last updated
4 months ago
docker pull aheadworks/phpdev:8.4-xdebug