A FIELD GUIDE TO LARAVEL · VOLUME II · THE ECOSYSTEM
ENTRY II.24 · LOCAL ENVIRONMENT
Sail
Laravel\Sail · Package · first recorded 4 December 2020, v0.0.1 on Packagist
A command-line wrapper for a Docker development environment. Added with composer require laravel/sail --dev; sail:install publishes a compose.yaml for the services you choose, so sail up gives PHP and a database in containers without learning Docker.
Specification
Kind Dev tool, local only. A shell script over Docker Compose
Interface sail <command>: up, stop, artisan, composer, npm, test, shell, share
Runs on macOS, Linux, Windows via WSL2; Docker Desktop or an engine
Installed by composer require laravel/sail --dev · sail:install · sail up
Voice sail:install · sail:add · sail:publish
Scales by One container per service in compose.yaml; sail:add appends another
Range Cloud: n/a: local only. Cloud builds from the repo, not compose
Forge, VPS: n/a: local only. Forge installs PHP on the host
Vapor: n/a: local only. Vapor builds its own runtime or a Dockerfile
Neighbours
Herd is the native environment for macOS and Windows, with no containers. Valet was the macOS one before it, through Homebrew; Homestead was the Vagrant box, its role since passed on. Sail runs the app and its services in Docker from a compose.yaml in the repo, so any machine with Docker gets the same set.
Field marks
compose.yaml
vendor/bin/sail
SAIL_XDEBUG_MODE
docker/ after sail:publish
Fig. II.24.1 · One script, several containers
Parts
1 sail script. vendor/bin/sail, usually aliased to sail. Every command is handed to Docker Compose or into a container.
2 compose.yaml. At the project root, published by sail:install. One service per container; edit it like any Compose file.
3 laravel.test. The application container: PHP 8.5 by default, 8.0 to 8.5 selectable, Node 24, served by artisan serve.
4 Services. Fifteen to pick from at sail:install or by --with; MySQL preselected, with Redis, Selenium, Mailpit under -n.
5 Volumes. Database and Redis data live in Docker volumes, so sail stop and sail up keep your rows between sessions.
6 Your browser. The site answers at http://localhost on the host; Mailpit at :8025, Meilisearch at :7700 when installed.
Hidden joinery
The MySQL container makes two databases on first start, yours and testing, and phpunit.xml is pointed at the second. sail share tunnels through Expose and needs trustProxies or URLs come out wrong. Xdebug is already in the image, switched by SAIL_XDEBUG_MODE. On Apple silicon the Selenium image must be chromium.
Every line checked against the Sail docs, Sail and skeleton source and Packagist on 2026-10-08.
TITLE
Sail · Docker, by one script
SOURCES
laravel.com/docs/13.x/sail · github.com/laravel/sail/blob/1.x/src/Console/InstallCommand.php · github.com/laravel/sail/blob/1.x/src/Console/Concerns/InteractsWithDockerComposeServices.php · github.com/laravel/sail/blob/1.x/runtimes/8.5/Dockerfile · github.com/laravel/sail/blob/1.x/stubs/compose.stub · github.com/laravel/laravel/blob/13.x/composer.json · github.com/laravel/laravel/commit/4c9bb62 · packagist.org/packages/laravel/sail · laravel.com/cloud/docs/deployments · laravel.com/forge/docs/knowledge-base/servers · docs.vapor.build/projects/environments#docker-runtimes · laravel.com/docs/13.x/valet
STATUS
Verified · 2026-10-08
SHEET
II.24 of 48
REV
A · 2026-10-08
DRAWN
BS
FINISH
All faces, including the back