Ubuntu based PHP development image extending "jamesmorrison/php"
10K+
PHP development images extending jamesmorrison/php with debugging tools, Node.js and command-line utilities.
Image: jamesmorrison/php-dev
These images are intended for development, not production. All users have passwordless sudo access.
PHP versions: 8.2, 8.3, 8.4 and 8.5.
Platforms: linux/amd64 and linux/arm64.
Version tags follow the format jamesmorrison/php-dev:<version>. Test tags use <version>-test-<commit-sha>.
Each version builds on the matching jamesmorrison/php:<version> image.
| Setting | Default |
|---|---|
| Base operating system | Ubuntu 24.04, inherited from the PHP image |
| PHP version for local builds | 8.5 |
| Container user | www-data - UID/GID 33 |
| User home directory | /home/www-data |
| Working directory | /var/www/html |
| Default startup script | /entrypoint-dev.sh |
| Default process | PHP-FPM in the foreground |
| FastCGI listener | 0.0.0.0:9000 |
| Upload and POST size limits | 100M, inherited from the default PHP image |
The image provides PHP-FPM, not an HTTP server. Application files and writable directories must have permissions suitable for www-data.
The image inherits PHP extensions, Composer, WP-CLI, ImageMagick, mail support and other runtime tools from the PHP image.
Development additions include:
nvm and Node.js are installed under the www-data home directory. nvm is shell-based; its environment must be loaded when needed in non-interactive shells.
Xdebug is installed, but the default startup script disables it unless ENABLE_XDEBUG=true.
| Environment variable | Default | Purpose |
|---|---|---|
ENABLE_XDEBUG | false | Controls Xdebug loading for CLI and FPM at startup |
The value is case-insensitive. Only true enables Xdebug.
Enabling Xdebug loads the extension; debugging modes, client connection settings and triggers require separate Xdebug configuration.
Commands that bypass /entrypoint-dev.sh also bypass its Xdebug enable/disable handling.
OPcache caches compiled PHP bytecode, not application results or database data.
| Setting | Default |
|---|---|
| FPM caching | Enabled |
| CLI caching | Disabled |
| Timestamp validation | Explicitly enabled |
| Timestamp revalidation interval | 0 - check on every request, inherited from the PHP image |
| OPcache memory | 128 MB |
| Interned strings buffer | 16 MB |
The development image appends opcache.validate_timestamps=1 to the inherited configuration. It does not change the revalidation interval.
PHP 8.2-8.4 use a separate OPcache package and module. PHP 8.5 includes OPcache in the PHP binary. The development override works with both arrangements.
Shared configuration: /etc/php/<version>/mods-available/docker-opcache.ini.
FPM configuration is inherited from the PHP image.
| Setting | Value |
|---|---|
| Process management | Dynamic |
| Maximum workers | 50 |
| Initial workers | 5 |
| Minimum idle workers | 5 |
| Maximum idle workers | 35 |
| Requests before worker recycling | 500 |
FPM error logs go to stderr, and worker output capture is enabled. Environment variables are available to FPM workers.
Pool configuration: /etc/php-fpm.d/.
The development startup script delegates to the PHP image startup script for mail and session configuration.
| Environment variable | Default |
|---|---|
MAILER_HOST | mailcatcher |
MAILER_PORT | 1025 |
SESSION_HANDLER | files |
SESSION_PATH | /var/lib/php/sessions |
Mail is forwarded through msmtp using the /usr/sbin/sendmail compatibility link.
Session settings apply to FPM.
| Argument | Default | Purpose |
|---|---|---|
PHP_VERSION | 8.5 | Selects the base image version and matching Xdebug package |
BASE_IMAGE | jamesmorrison/php | Selects the base image repository |
Upload limits and other base-image settings are inherited. PHP_UPLOAD_LIMIT is configured when building the PHP base image, not this development image.
Checks that a PHP-FPM process exists and TCP port 9000 accepts connections.
| Setting | Value |
|---|---|
| Interval | 30 seconds |
| Timeout | 10 seconds |
| Startup grace period | 40 seconds |
| Retries | 3 |
The check covers process/listener availability, not application health. It expects the container to be running PHP-FPM rather than a standalone CLI command.
Content type
Image
Digest
sha256:6e297b911…
Size
418.8 MB
Last updated
4 days ago
docker pull jamesmorrison/php-dev:8.4