A Docker-based installer and runtime for Symfony. Install: download and
docker compose up.
https://dunglas.dev/2021/12/symfonys-new-native-docker-support-symfony-world/
- Shell 60.7%
- Dockerfile 39.3%
* fix: copy openssl.cnf from prod builder image and set openssl conf env variable * Combine ENV variable declarations in Dockerfile --------- Co-authored-by: Kévin Dunglas <kevin@dunglas.fr> |
||
|---|---|---|
| .devcontainer | ||
| .github | ||
| docs | ||
| frankenphp | ||
| .dockerignore | ||
| .editorconfig | ||
| .gitattributes | ||
| compose.override.yaml | ||
| compose.prod.yaml | ||
| compose.yaml | ||
| composer.json | ||
| Dockerfile | ||
| README.md | ||
Symfony Docker
A Docker-based installer and runtime for the Symfony web framework, with FrankenPHP and Caddy inside!
Specially tailored for coding agents: ships with a Dev Container configuration that lets Claude Code (and other AI coding assistants) run in fully autonomous mode inside a sandboxed environment.
Getting Started
- If not already done, install Docker Compose (v2.10+)
- Run
docker compose build --pull --no-cacheto build fresh images - Run
docker compose up --waitto set up and start a fresh Symfony project - Open
https://localhostin your favorite web browser and accept the auto-generated TLS certificate - Run
docker compose down --remove-orphansto stop the Docker containers.
Features
- Production, development and CI ready
- Just 1 service by default
- Super-readable configuration
- Blazing-fast performance thanks to the worker mode of FrankenPHP
- Installation of extra Docker Compose services with Symfony Flex
- Automatic HTTPS (in dev and prod)
- HTTP/3 and Early Hints support
- Real-time messaging thanks to a built-in Mercure hub
- Vulcain support
- Native XDebug integration
- Hot Reloading
- Dev Container support, optimized for AI coding agents
- AI coding agents with sandboxing out of the box
- Rootless, slim production image
Enjoy!
Docs
- Options available
- Using Symfony Docker with an existing project
- Support for extra services
- Deploying in production
- Debugging with Xdebug
- TLS Certificates
- Using MySQL instead of PostgreSQL
- Using Alpine Linux instead of Debian
- Using a Makefile
- Updating the template
- Troubleshooting
- Using AI Coding Agents
License
Symfony Docker is available under the MIT License.
Credits
Created by Kévin Dunglas, co-maintained by Maxime Helias and sponsored by Les-Tilleuls.coop.