Optimized multi-platform Docker base image for Laravel with essential PHP tools and extensions.
2.2K
š A production-ready, multi-platform Docker base image optimized for Laravel applications.
š Security update (Oct 22, 2026): all tags were rebuilt on the patched PHP releases 8.2.35, 8.3.36, 8.4.27 and 8.5.12, which fix two critical unauthenticated remote code execution vulnerabilities in PHP (CVE-2026-109618, CVE-2026-109619). Re-pull your tag and rebuild your images. See Securityā below.
# Pull latest (PHP 8.5)
docker pull almossaidllc/php-laravel-base:latest
# Or specific PHP version
docker pull almossaidllc/php-laravel-base:8.4
docker pull almossaidllc/php-laravel-base:8.3
docker pull almossaidllc/php-laravel-base:8.2
# Or pin an exact patch release
docker pull almossaidllc/php-laravel-base:8.4.27
| Tag | PHP Version | Notes |
|---|---|---|
latest, 8.5, 8.5.12 | 8.5.12 | š Newest, recommended for new projects |
8.4, 8.4.27 | 8.4.27 | Current stable |
8.3, 8.3.36 | 8.3.36 | Security fixes until Dec 2027 |
8.2, 8.2.35 | 8.2.35 | ā ļø PHP 8.2 reaches end of life on Dec 31, 2026 |
8.4) always point to the newest patched build of that version, so use them to receive security fixes automatically.8.4.27) never change, so use them for fully reproducible builds.latest now points to PHP 8.5 (previously 8.4).ā
Multi-Platform: linux/amd64 + linux/arm64 on every tag
ā
PHP Versions: 8.2, 8.3, 8.4, 8.5
ā
OPcache + JIT: Enabled for maximum performance
ā
Alpine-based: Minimal footprint, OS packages upgraded at build time
ā
Non-root user: appuser (uid 1000) ready to use
PHP Extensions: pdo_mysql, pdo_pgsql, mysqli, redis, gd, imagick, intl, mbstring, bcmath, opcache, pcntl, sockets, zip, exif, soap, xsl
Tools: Composer, Laravel Installer, Laravel Envoy, PHPUnit, Pest, PHP-CS-Fixer, PHP_CodeSniffer, Supervisor, Node.js/npm
FROM almossaidllc/php-laravel-base:8.5
WORKDIR /var/www/html
COPY . .
RUN composer install --no-dev --optimize-autoloader
RUN chown -R appuser:appgroup storage bootstrap/cache
USER appuser
CMD ["php-fpm"]
| Variable | Default | Description |
|---|---|---|
PHP_OPCACHE_VALIDATE_TIMESTAMPS | 0 | Set 1 for dev |
PHP_OPCACHE_MEMORY_CONSUMPTION | 256 | OPcache memory (MB) |
PHP_OPCACHE_MAX_ACCELERATED_FILES | 20000 | Max cached files |
PHP_OPCACHE_JIT_BUFFER_SIZE | 128M | JIT buffer size |
| CVE | Issue | Fixed in |
|---|---|---|
| CVE-2026-109618ā | RCE via out-of-memory corruption | 8.2.35, 8.3.36, 8.4.27, 8.5.12 |
| CVE-2026-109619ā | RCE via stale global state (use-after-free) | 8.2.35, 8.3.36, 8.4.27, 8.5.12 |
Both vulnerabilities affect PHP-FPM and can be exploited by an unauthenticated request.
All images of this repository published before Oct 22, 2026 are vulnerable (for example,
the previous 8.3 shipped PHP 8.3.30 and 8.4 shipped PHP 8.4.17). There is no workaround,
so updating is the only fix.
How to update:
# 1. Pull the patched base image
docker pull almossaidllc/php-laravel-base:8.4
# 2. Rebuild your application image without cache
docker build --pull --no-cache -t my-app .
# 3. Verify the PHP version inside your container
docker run --rm my-app php -v
All tags are tested on both amd64 and arm64 before release: PHP version, extensions,
OPcache, php-fpm startup, tools and the non-root user.
š Documentationā
š Issuesā
š PHP Security Advisoryā
Abdelilah EZZOUINI
docker pull almossaidllc/php-laravel-base:latest