HUB
Sign inSign up

almossaidllc/php-laravel-base

By almossaidllc

•Updated about 1 month ago

Optimized multi-platform Docker base image for Laravel with essential PHP tools and extensions.

Image
Languages & frameworks
Web servers
Operating systems
3

2.2K

almossaidllc/php-laravel-base repository overview

⁠PHP Laravel Base Image

šŸš€ 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.

⁠Quick Start

# 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

⁠Tags

TagPHP VersionNotes
latest, 8.5, 8.5.128.5.12šŸ†• Newest, recommended for new projects
8.4, 8.4.278.4.27Current stable
8.3, 8.3.368.3.36Security fixes until Dec 2027
8.2, 8.2.358.2.35āš ļø PHP 8.2 reaches end of life on Dec 31, 2026
  • Minor tags (8.4) always point to the newest patched build of that version, so use them to receive security fixes automatically.
  • Patch tags (8.4.27) never change, so use them for fully reproducible builds.
  • latest now points to PHP 8.5 (previously 8.4).

⁠Features

āœ… 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

⁠Included

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

⁠Usage

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"]

⁠Environment Variables

VariableDefaultDescription
PHP_OPCACHE_VALIDATE_TIMESTAMPS0Set 1 for dev
PHP_OPCACHE_MEMORY_CONSUMPTION256OPcache memory (MB)
PHP_OPCACHE_MAX_ACCELERATED_FILES20000Max cached files
PHP_OPCACHE_JIT_BUFFER_SIZE128MJIT buffer size

⁠Security

⁠October 2026: critical PHP RCE vulnerabilities
CVEIssueFixed in
CVE-2026-109618⁠RCE via out-of-memory corruption8.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⁠

⁠Maintainer

Abdelilah EZZOUINI

Tag summary
Recent tags
Content type
Image
Digest
sha256:ea85f1d63…
Size
113.6 MB
Last updated
about 1 month ago
docker pull almossaidllc/php-laravel-base:latest