Image designed to work with the Laravel framework based on PHP and Apache.
50K+
Esta documentación está traducida al inglés al final.
Imagen Docker preconfigurada para el ecosistema Laravel (versiones 5.0 a 13), con compatibilidad estricta entre PHP, Composer y Node.js LTS de cada era.
IMPORTANTE: Sin motor de base de datos embebido. Solo para desarrollo y pruebas, no usar en producción.
Todas las imágenes usan Ubuntu 24.04 LTS. Estas versiones de PHP están EOL: solo para desarrollo local, nunca exponer a internet.
| PHP | EOL PHP | Origen de PHP | Parche PHP2Shell |
|---|---|---|---|
| 5.6 | Dic 2018 | PPA ondrej/php | Backport del PPA |
| 7.0 | Dic 2019 | PPA ondrej/php | Backport del PPA |
| 7.1 | Dic 2019 | PPA ondrej/php | Backport del PPA |
| 7.2 | Nov 2020 | PPA ondrej/php | Backport del PPA |
| 7.3 | Dic 2021 | PPA ondrej/php | Backport del PPA |
| 7.4 | Nov 2022 | PPA ondrej/php | Backport del PPA |
| 8.0 | Nov 2023 | PPA ondrej/php | Backport del PPA |
| 8.1 | Dic 2024 | PPA ondrej/php | Backport del PPA |
| 8.2 | Dic 2025 | PPA ondrej/php | Parche oficial (8.2.35) |
Node.js 10, 12, 14 y 16 también están fuera de soporte.
Las imágenes publicadas desde octubre de 2026 incluyen la corrección: PHP 5.6–8.1 con backport del PPA, 8.2 con 8.2.35, 8.3 con el paquete nativo de Ubuntu (8.3.6, parchado por Canonical), 8.4 con 8.4.27 y 8.5 con 8.5.12. Cada Dockerfile verifica el parche al compilar y falla si el changelog de PHP no menciona CVE-2026-109618.
php -v no indica si hay parche (el número de versión no cambia en backports). Para comprobarlo:
docker run --rm --entrypoint sh alvar0rm/laravel:7-php7.4 \
-c 'zcat /usr/share/doc/php7.4-common/changelog.Debian.gz | grep CVE-2026-109618'
CVE-2026-115560 (anunciado el 23 de octubre de 2026): mitigación
session.upload_progress.enabled=0. Estas imágenes no la aplican; PHP la trae activada por defecto.
services:
app:
image: alvar0rm/laravel:13-php8.4
restart: unless-stopped
volumes:
- ./app:/var/www/app
ports:
- "80:80"
- "5173:5173"
Si
/var/www/appestá vacío, el entrypoint copia automáticamente un proyecto Laravel base.
docker run -d -p 80:80 \
-v $(pwd)/app:/var/www/app \
alvar0rm/laravel:13-php8.4-supervisor
FROM alvar0rm/laravel:13-php8.4
RUN apt-get update && apt-get install -y cron && rm -rf /var/lib/apt/lists/*
| Variable | Descripción | Default |
|---|---|---|
TZ | Zona horaria (ej: America/Mexico_City) | UTC |
GIT_USER_NAME | Nombre para Git | Docker User |
GIT_USER_EMAIL | Email para Git | [email protected] |
GIT_DEFAULT_BRANCH | Rama por defecto | master |
GIT_EDITOR | Editor Git | - |
GIT_PULL_REBASE | Estrategia de pull | - |
GIT_HTTP_PROXY | Proxy HTTP para Git | - |
GIT_HTTPS_PROXY | Proxy HTTPS para Git | - |
GIT_COLOR_UI | Colores en Git | - |
GIT_CREDENTIAL_HELPER | Credential helper | - |
GIT_SAFE_DIRECTORY | Safe directory | /var/www/app |
GIT_ALIASES | Alias personalizados | - |
GIT_CLONE_URL | URL del repo a clonar | - |
GIT_CLONE_BRANCH | Rama a clonar | - |
GIT_CLONE_DEPTH | Profundidad (shallow) | - |
GIT_POST_CLONE_COMMANDS | Comandos post-clonación | - |
Si GIT_CLONE_URL está definido y la carpeta está vacía, clona el repo automáticamente.
environment:
TZ: "America/Mexico_City"
GIT_USER_NAME: "Docker user"
GIT_DEFAULT_BRANCH: "main"
GIT_CLONE_URL: "https://github.com/usuario/proyecto.git"
Alias predefinidos:
git s(status) ·git lg(log)
Nomenclatura: {laravel}-php{version}[-supervisor] · Base: Ubuntu 24.04 LTS
| Laravel | PHP | Tags de ejemplo |
|---|---|---|
| 5.0–5.1 | 5.6 | 5-php5.6, 5.1-php5.6-supervisor |
| 5.2–5.4 | 5.6 / 7.0 / 7.1 / 7.2 | 5.2-php7.0, 5.4-php7.2-supervisor |
| 5.5 | 7.0 / 7.1 / 7.2 / 7.3 / 7.4 | 5.5-php7.0, 5.5-php7.4-supervisor |
| 5.6–5.8 | 7.1 / 7.2 / 7.3 / 7.4 | 5.6-php7.2, 5.8-php7.4-supervisor |
| 6–7 | 7.2 / 7.3 / 7.4 / 8.0 | 6-php7.4, 7-php8.0-supervisor |
| 8 | 7.3 / 7.4 / 8.0 / 8.1 | 8-php7.4, 8-php8.1-supervisor |
| 9 | 8.0 / 8.1 / 8.2 | 9-php8.0, 9-php8.2-supervisor |
| 10 | 8.1 / 8.2 / 8.3 | 10-php8.1, 10-php8.3-supervisor |
| 11 | 8.2 / 8.3 / 8.4 | 11-php8.2, 11-php8.4-supervisor |
| 12 | 8.2 / 8.3 / 8.4 | 12-php8.3, 12-php8.4-supervisor |
| 13 | 8.3 / 8.4 / 8.5 | 13-php8.3, 13-php8.5 (8.5 sin variante -supervisor) |
| PHP | amd64 | arm64 | Motivo |
|---|---|---|---|
| 5.6 | ✅ | ✅ | — |
| 7.0–7.3 | ✅ | ❌ | Usan ODBC 17, no publicado para arm64 en Ubuntu 24.04 |
| 7.4–8.5 | ✅ | ✅ | — |
| PHP | Composer |
|---|---|
| 5.6–8.0 | 2.2.27 |
| 8.1 | 2.3.10 |
| 8.2 | 2.6.6 |
| 8.3 | 2.7.9 |
| 8.4–8.5 | 2.8.5 |
| Laravel | Node.js | Yarn | pnpm | Bun |
|---|---|---|---|---|
| 5.0 | 10.24.1 | ❌ | ❌ | ❌ |
| 5.1–5.4 | 10.24.1 | 1.x (Classic) | ❌ | ❌ |
| 5.5–5.8 | 12.22.12 | 1.x (Classic) | ❌ | ❌ |
| 6–7 | 14.21.3 | 1.x (Classic) | ❌ | ❌ |
| 8–9 | 16.20.2 | 1.x (Classic) | 8.x | ❌ |
| 10 | 18.20.8 | 4.x (corepack) | 10.x | 1.x |
| 11 | 20.18.3 | 4.x (corepack) | 10.x | 1.x |
| 12–13 | 22.14.0 | 4.x (corepack) | 11.x | 1.x |
| Base OS | Supervisor |
|---|---|
| Ubuntu 24.04 LTS | 4.2.x (4.2.5) |
| Extensión | PHP 5.6 | PHP 7.x | PHP 8.x |
|---|---|---|---|
| bcmath, gd, intl, opcache, zip | ✅ | ✅ | ✅ |
| pdo_mysql, pdo_pgsql, pdo_sqlite | ✅ | ✅ | ✅ |
| mbstring, curl, xml, readline | ✅ | ✅ | ✅ |
| mcrypt | Laravel 5.0–5.2 | 7.0 y 7.1 (Laravel 5.2) | ❌ |
| pdo_dblib (FreeTDS) | ✅ | ❌ | ❌ |
| pdo_sqlsrv (SQL Server) | ❌ | ✅ | ✅ |
| redis | ✅ | ✅ | ✅ |
| imagick | ✅ | ✅ | ✅ |
Conexión a SQL Server: PHP 5.6 usa pdo_dblib (FreeTDS). PHP 7.0–7.3 usa pdo_sqlsrv con ODBC Driver 17 (pdo_sqlsrv 5.3.0 en 7.0–7.2 y 5.9.0 en 7.3). PHP 7.4–8.5 usa pdo_sqlsrv con ODBC Driver 18 (5.10.1 en 7.4, 5.11.1 en 8.0–8.2, 5.12.0 en 8.3 y 5.13.3 en 8.4–8.5). Microsoft solo soporta ODBC 18 con pdo_sqlsrv 5.10 o superior. En PHP 8.5, OPcache viene integrado en el núcleo.
/var/www/app/public/etc/apache2/apache2.conf/etc/apache2/sites-available/000-default.conf/etc/apache2/sites-available/default-ssl.confphp.ini)| Directiva | Valor |
|---|---|
memory_limit | 512M |
max_execution_time | 3600 |
max_input_time | 3600 |
post_max_size | 2G |
upload_max_filesize | 2G |
max_file_uploads | 20 |
display_errors | Off |
log_errors | On |
expose_php | Off |
session.use_strict_mode | 1 |
Las imágenes con -supervisor incluyen Supervisor preconfigurado con un worker de ejemplo.
Directorios de configuración:
/etc/supervisor/conf.d//var/www/app/storage/supervisor/[program:queue-default]
command=php /var/www/app/artisan queue:listen --timeout=3600 --tries=1
autostart=true
autorestart=true
numprocs=1
user=www-data
stdout_logfile=/var/www/app/storage/logs/default.log
| Comando | Descripción |
|---|---|
supervisorctl reread | Recargar configuración |
supervisorctl update | Aplicar cambios |
supervisorctl start <prog> | Iniciar programa |
supervisorctl status | Ver estado |
El entrypoint habilita HTTPS automáticamente si detecta certificados en:
/etc/ssl/certs/localhost.crt/etc/ssl/private/localhost.keyvolumes:
- ./certs/localhost.crt:/etc/ssl/certs/localhost.crt:ro
- ./certs/localhost.key:/etc/ssl/private/localhost.key:ro
services:
app:
image: alvar0rm/laravel:13-php8.4
environment:
GIT_CLONE_URL: "[email protected]:usuario/repositorio.git"
SSH_AUTH_SOCK: "/tmp/ssh-agent.sock"
volumes:
- ~/.ssh/id_rsa:/root/.ssh/id_rsa:ro # Clonado inicial
- ${SSH_AUTH_SOCK}:/tmp/ssh-agent.sock:ro # Push/pull posteriores
- ~/.ssh/known_hosts:/root/.ssh/known_hosts:ro # Verificación de host
| Montaje | Propósito |
|---|---|
id_rsa | Clonado inicial del repositorio |
ssh-agent.sock | Push/pull posteriores sin passphrase |
known_hosts | Evita errores de verificación de host |
Llave sin passphrase (alternativa):
ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519_docker -N "" -C "docker-dev"
Problemas comunes:
| Error | Solución |
|---|---|
Permission denied (publickey) | ssh-add ~/.ssh/id_rsa o verificar el volumen |
Host key verification failed | ssh-keyscan github.com >> ~/.ssh/known_hosts |
unsupported option "accept-new" | Automático — el entrypoint detecta la versión de OpenSSH |
Compatibilidad accept-new: todas las imágenes (PHP 5.6–8.5) usan Ubuntu 24.04 con OpenSSH 9.6, que soporta accept-new.
Pre-configured Docker image for the Laravel ecosystem (versions 5.0 to 13), with strict compatibility between PHP, Composer, and the LTS Node.js of each era.
IMPORTANT: No embedded database engine. For development and testing only — do not use in production.
All images use Ubuntu 24.04 LTS. These PHP versions are EOL: local development only — never expose to the internet.
| PHP | PHP EOL | PHP source | PHP2Shell patch |
|---|---|---|---|
| 5.6 | Dec 2018 | PPA ondrej/php | PPA backport |
| 7.0 | Dec 2019 | PPA ondrej/php | PPA backport |
| 7.1 | Dec 2019 | PPA ondrej/php | PPA backport |
| 7.2 | Nov 2020 | PPA ondrej/php | PPA backport |
| 7.3 | Dec 2021 | PPA ondrej/php | PPA backport |
| 7.4 | Nov 2022 | PPA ondrej/php | PPA backport |
| 8.0 | Nov 2023 | PPA ondrej/php | PPA backport |
| 8.1 | Dec 2024 | PPA ondrej/php | PPA backport |
| 8.2 | Dec 2025 | PPA ondrej/php | Official patch (8.2.35) |
Node.js 10, 12, 14 and 16 are also out of support.
Images published from October 2026 include the fix: PHP 5.6–8.1 with a PPA backport, 8.2 with 8.2.35, 8.3 with the native Ubuntu package (8.3.6, patched by Canonical), 8.4 with 8.4.27 and 8.5 with 8.5.12. Every Dockerfile verifies the patch at build time and fails if the PHP changelog does not mention CVE-2026-109618.
php -v does not tell you whether the patch is present (backports keep the version number). To check:
docker run --rm --entrypoint sh alvar0rm/laravel:7-php7.4 \
-c 'zcat /usr/share/doc/php7.4-common/changelog.Debian.gz | grep CVE-2026-109618'
CVE-2026-115560 (announced October 23, 2026): mitigation is
session.upload_progress.enabled=0. These images do not apply it; PHP enables it by default.
services:
app:
image: alvar0rm/laravel:13-php8.4
restart: unless-stopped
volumes:
- ./app:/var/www/app
ports:
- "80:80"
- "5173:5173"
If
/var/www/appis empty, the entrypoint automatically copies a base Laravel project.
docker run -d -p 80:80 \
-v $(pwd)/app:/var/www/app \
alvar0rm/laravel:13-php8.4-supervisor
FROM alvar0rm/laravel:13-php8.4
RUN apt-get update && apt-get install -y cron && rm -rf /var/lib/apt/lists/*
| Variable | Description | Default |
|---|---|---|
TZ | Timezone (e.g. America/New_York) | UTC |
GIT_USER_NAME | Git user name | Docker User |
GIT_USER_EMAIL | Git user email | [email protected] |
GIT_DEFAULT_BRANCH | Default branch | master |
GIT_EDITOR | Git editor | - |
GIT_PULL_REBASE | Pull strategy | - |
GIT_HTTP_PROXY | HTTP proxy for Git | - |
GIT_HTTPS_PROXY | HTTPS proxy for Git | - |
GIT_COLOR_UI | Git colors | - |
GIT_CREDENTIAL_HELPER | Credential helper | - |
GIT_SAFE_DIRECTORY | Safe directory | /var/www/app |
GIT_ALIASES | Custom aliases | - |
GIT_CLONE_URL | Repo URL to clone | - |
GIT_CLONE_BRANCH | Branch to clone | - |
GIT_CLONE_DEPTH | Depth (shallow clone) | - |
GIT_POST_CLONE_COMMANDS | Post-clone commands | - |
If GIT_CLONE_URL is set and the folder is empty, the repo is cloned automatically.
environment:
TZ: "America/New_York"
GIT_USER_NAME: "Docker user"
GIT_DEFAULT_BRANCH: "main"
GIT_CLONE_URL: "https://github.com/user/project.git"
Predefined aliases:
git s(status) ·git lg(log)
Naming convention: {laravel}-php{version}[-supervisor] · Base: Ubuntu 24.04 LTS
| Laravel | PHP | Example Tags |
|---|---|---|
| 5.0–5.1 | 5.6 | 5-php5.6, 5.1-php5.6-supervisor |
| 5.2–5.4 | 5.6 / 7.0 / 7.1 / 7.2 | 5.2-php7.0, 5.4-php7.2-supervisor |
| 5.5 | 7.0 / 7.1 / 7.2 / 7.3 / 7.4 | 5.5-php7.0, 5.5-php7.4-supervisor |
| 5.6–5.8 | 7.1 / 7.2 / 7.3 / 7.4 | 5.6-php7.2, 5.8-php7.4-supervisor |
| 6–7 | 7.2 / 7.3 / 7.4 / 8.0 | 6-php7.4, 7-php8.0-supervisor |
| 8 | 7.3 / 7.4 / 8.0 / 8.1 | 8-php7.4, 8-php8.1-supervisor |
| 9 | 8.0 / 8.1 / 8.2 | 9-php8.0, 9-php8.2-supervisor |
| 10 | 8.1 / 8.2 / 8.3 | 10-php8.1, 10-php8.3-supervisor |
| 11 | 8.2 / 8.3 / 8.4 | 11-php8.2, 11-php8.4-supervisor |
| 12 | 8.2 / 8.3 / 8.4 | 12-php8.3, 12-php8.4-supervisor |
| 13 | 8.3 / 8.4 / 8.5 | 13-php8.3, 13-php8.5 (8.5 has no -supervisor variant) |
| PHP | amd64 | arm64 | Reason |
|---|---|---|---|
| 5.6 | ✅ | ✅ | — |
| 7.0–7.3 | ✅ | ❌ | They use ODBC 17, not published for arm64 on Ubuntu 24.04 |
| 7.4–8.5 | ✅ | ✅ | — |
| PHP | Composer |
|---|---|
| 5.6–8.0 | 2.2.27 |
| 8.1 | 2.3.10 |
| 8.2 | 2.6.6 |
| 8.3 | 2.7.9 |
| 8.4–8.5 | 2.8.5 |
| Laravel | Node.js | Yarn | pnpm | Bun |
|---|---|---|---|---|
| 5.0 | 10.24.1 | ❌ | ❌ | ❌ |
| 5.1–5.4 | 10.24.1 | 1.x (Classic) | ❌ | ❌ |
| 5.5–5.8 | 12.22.12 | 1.x (Classic) | ❌ | ❌ |
| 6–7 | 14.21.3 | 1.x (Classic) | ❌ | ❌ |
| 8–9 | 16.20.2 | 1.x (Classic) | 8.x | ❌ |
| 10 | 18.20.8 | 4.x (corepack) | 10.x | 1.x |
| 11 | 20.18.3 | 4.x (corepack) | 10.x | 1.x |
| 12–13 | 22.14.0 | 4.x (corepack) | 11.x | 1.x |
| Base OS | Supervisor |
|---|---|
| Ubuntu 24.04 LTS | 4.2.x (4.2.5) |
| Extension | PHP 5.6 | PHP 7.x | PHP 8.x |
|---|---|---|---|
| bcmath, gd, intl, opcache, zip | ✅ | ✅ | ✅ |
| pdo_mysql, pdo_pgsql, pdo_sqlite | ✅ | ✅ | ✅ |
| mbstring, curl, xml, readline | ✅ | ✅ | ✅ |
| mcrypt | Laravel 5.0–5.2 | 7.0 and 7.1 (Laravel 5.2) | ❌ |
| pdo_dblib (FreeTDS) | ✅ | ❌ | ❌ |
| pdo_sqlsrv (SQL Server) | ❌ | ✅ | ✅ |
| redis | ✅ | ✅ | ✅ |
| imagick | ✅ | ✅ | ✅ |
SQL Server connectivity: PHP 5.6 uses pdo_dblib (FreeTDS). PHP 7.0–7.3 uses pdo_sqlsrv with ODBC Driver 17 (pdo_sqlsrv 5.3.0 on 7.0–7.2 and 5.9.0 on 7.3). PHP 7.4–8.5 uses pdo_sqlsrv with ODBC Driver 18 (5.10.1 on 7.4, 5.11.1 on 8.0–8.2, 5.12.0 on 8.3 and 5.13.3 on 8.4–8.5). Microsoft only supports ODBC 18 with pdo_sqlsrv 5.10 or later. In PHP 8.5, OPcache is built into the core.
/var/www/app/public/etc/apache2/apache2.conf/etc/apache2/sites-available/000-default.conf/etc/apache2/sites-available/default-ssl.confphp.ini)| Directive | Value |
|---|---|
memory_limit | 512M |
max_execution_time | 3600 |
max_input_time | 3600 |
post_max_size | 2G |
upload_max_filesize | 2G |
max_file_uploads | 20 |
display_errors | Off |
log_errors | On |
expose_php | Off |
session.use_strict_mode | 1 |
Images with -supervisor include Supervisor pre-configured with an example queue worker.
Configuration directories:
/etc/supervisor/conf.d//var/www/app/storage/supervisor/[program:queue-default]
command=php /var/www/app/artisan queue:listen --timeout=3600 --tries=1
autostart=true
autorestart=true
numprocs=1
user=www-data
stdout_logfile=/var/www/app/storage/logs/default.log
| Command | Description |
|---|---|
supervisorctl reread | Reload configuration |
supervisorctl update | Apply changes |
supervisorctl start <prog> | Start program |
supervisorctl status | Show status |
The entrypoint auto-enables HTTPS if it detects certificates at:
/etc/ssl/certs/localhost.crt/etc/ssl/private/localhost.keyvolumes:
- ./certs/localhost.crt:/etc/ssl/certs/localhost.crt:ro
- ./certs/localhost.key:/etc/ssl/private/localhost.key:ro
services:
app:
image: alvar0rm/laravel:13-php8.4
environment:
GIT_CLONE_URL: "[email protected]:user/repository.git"
SSH_AUTH_SOCK: "/tmp/ssh-agent.sock"
volumes:
- ~/.ssh/id_rsa:/root/.ssh/id_rsa:ro # Initial clone
- ${SSH_AUTH_SOCK}:/tmp/ssh-agent.sock:ro # Subsequent push/pull
- ~/.ssh/known_hosts:/root/.ssh/known_hosts:ro # Host verification
| Mount | Purpose |
|---|---|
id_rsa | Initial repository clone |
ssh-agent.sock | Subsequent push/pull without passphrase |
known_hosts | Prevents host verification errors |
Key without passphrase (alternative):
ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519_docker -N "" -C "docker-dev"
Common issues:
| Error | Solution |
|---|---|
Permission denied (publickey) | ssh-add ~/.ssh/id_rsa or check the volume mount |
Host key verification failed | ssh-keyscan github.com >> ~/.ssh/known_hosts |
unsupported option "accept-new" | Automatic — entrypoint detects OpenSSH version |
accept-new compatibility: all images (PHP 5.6–8.5) use Ubuntu 24.04 with OpenSSH 9.6, which supports accept-new.
Content type
Image
Digest
sha256:ec14a6ed6…
Size
405.8 MB
Last updated
3 days ago
docker pull alvar0rm/laravel:13-php8.5