RoadRunner
What is RoadRunner?
RoadRunner is a high-performance PHP application server written in Go, an alternative to PHP-FPM for keeping long-running PHP worker processes alive between requests instead of bootstrapping your app from scratch every time. It's a supported driver for Laravel Octane. The Laradock image pulls the official rr binary and layers it on a PHP-CLI Alpine image with the sockets and opcache extensions installed, then serves your mounted app via its .rr.yaml config (CMD ["rr", "serve"]).
Start RoadRunner
docker compose up -d roadrunner
RoadRunner is self-contained: it doesn't declare a dependency on php-fpm or a web server, it serves your app directly via the rr binary.
Stop RoadRunner
docker compose stop roadrunner
Configuration
All settings live in roadrunner/defaults.env and can be overridden by adding the same line to your own .env:
| Variable | Default | What it does |
|---|---|---|
ROADRUNNER_VERSION | 2025.1.15 | Version of the official RoadRunner image the rr binary is pulled from (build arg). |
ROADRUNNER_HTTP_PORT | 8090 | Host-side port mapped to container port 8080. |
The container also builds against LARADOCK_PHP_VERSION (Laradock's shared PHP_VERSION) and CHANGE_SOURCE, and adds an extra_hosts entry for dockerhost pointing at DOCKER_HOST_IP.
Set up Octane with RoadRunner
- In your Laravel app, install Octane with the RoadRunner driver:
This generates acomposer require laravel/octane spiral/roadrunner-cliphp artisan octane:install --server=roadrunner
.rr.yamlfile. Set its HTTP address to0.0.0.0:8080so it's reachable from outside the container. - Start the container:
docker compose up -d roadrunner
- Your app is served on the host at
ROADRUNNER_HTTP_PORT(8090by default), mapped to container port8080.
Change the exposed port
ROADRUNNER_HTTP_PORT=8095
docker compose up -d roadrunner
Common issues
- Container starts but nothing responds.
.rr.yamlneeds its HTTP address set to0.0.0.0:8080, not127.0.0.1:8080, otherwise it only listens inside its own network namespace. .rr.yamlnot found. It's generated byphp artisan octane:install --server=roadrunnerinside your Laravel app; run that first, and confirm your app code is mounted correctly viaAPP_CODE_PATH_HOST.- Extension-related errors. The image only installs
socketsandopcacheby default; additional extensions need to be added toroadrunner/Dockerfileand the image rebuilt:docker compose build roadrunner. - Port already in use on your host. Another service is already bound to
8090. ChangeROADRUNNER_HTTP_PORTand restart.
Want another Octane-compatible runtime? See FrankenPHP. Looking for the classic Nginx + PHP-FPM setup instead? See Nginx. New to Laradock? Start with Getting Started.