Laradock vs Laravel Sail
What is Laravel Sail?
Laravel Sail is Laravel's own, official command-line interface for running a Laravel application in Docker. It ships automatically with every new Laravel project: no separate install, just a sail command and a small docker-compose.yml file that Laravel generates for you, covering PHP, a database, and a handful of common services.
It is intentionally minimal and Laravel-specific. This page compares it to Laradock, a framework-agnostic alternative with 100+ pre-configured services instead of Sail's shorter list, used directly through plain docker compose rather than a wrapper command.
Sail is Laravel's official Docker scaffold: small, clean, Laravel-only. Laradock is the framework-agnostic catalog: 100+ services behind the same plain Docker workflow. This page runs the same app on both.
TL;DR: pick Sail for a vanilla Laravel app with vanilla needs; it is official and it is enough. Pick Laradock the day your stack outgrows Sail's service list, you run more than Laravel, or you would rather use docker compose directly than through a wrapper script.
Setting up with Sail
For a brand-new app, one command scaffolds everything:
curl -s "https://laravel.build/my-app?with=mysql,redis" | bash
cd my-app && ./vendor/bin/sail up -d
For an existing app: composer require laravel/sail --dev, then php artisan sail:install and pick your services from the menu (MySQL, Postgres, Redis, Meilisearch, Mailpit, Selenium, and a few more).
Day to day, everything goes through the wrapper: sail up, sail artisan migrate, sail composer require, sail test.
Change PHP version: edit compose.yaml, point the build context at another runtime (./vendor/laravel/sail/runtimes/8.3), change the image name to match, then sail build --no-cache.
The same thing with Laradock
cd my-app
git clone https://github.com/laradock/laradock.git
cd laradock
- Laradock CLI
- Docker Compose
./laradock start nginx mysql redis workspace
./laradock workspace
cp .env.example .env
docker compose up -d nginx mysql redis workspace
docker compose exec workspace bash
Inside the workspace: artisan, composer, npm all live here. Or let the optional CLI do the choosing: ./laradock setup detects Laravel and pre-selects nginx/mysql/redis, exactly like sail:install's menu, then shows every real command it runs.
Day to day you use Docker directly: ./laradock exec workspace php artisan migrate, ./laradock logs nginx -f, ./laradock stop.
Change PHP version: PHP_VERSION=8.3 in .env, then ./laradock rebuild php-fpm workspace (or docker compose build php-fpm workspace). Runs anything from PHP 5.6 to 8.5, which Sail does not attempt (great for legacy projects).
Side by side
| Laravel Sail | Laradock | |
|---|---|---|
| Ships with | Laravel itself (official) | git clone |
| Services | ~10 (chosen at install) | 100+ (start any, any time) |
| Frameworks | Laravel only | Any PHP project |
| Commands | sail * wrapper | standard docker compose * |
| Web server | Built-in PHP server (artisan serve) by default | Real NGINX / Apache / Caddy, production-style |
| PHP versions | 8.0 - 8.4 runtimes | 5.6 - 8.5 |
| Adding a service later | Only if Sail supports it (else hand-edit compose.yaml) | docker compose up -d {service} |
| Dev shell | none (commands via sail) | workspace container with Composer, Node, git, and dozens of tools |
| Config | one compose.yaml in your repo | per-service folders + one .env |
| Production deployment | Dev only — Sail is explicitly not meant for production | ./laradock ship → hardened image for a server, Kubernetes (EKS/GKE/AKS), or managed cloud (ECS, Cloud Run, Fly) |
Command-to-command map
Everything you do with sail has a Laradock equivalent. Sail routes every action through one sail wrapper; Laradock uses plain-English verbs for the stack and runs your dev tools inside the workspace container (or via a one-off exec). Same capabilities, no wrapper lock-in.
| Task | Laravel Sail | Laradock |
|---|---|---|
| Start the stack | sail up -d | ./laradock start |
| Stop the stack | sail stop | ./laradock stop |
| Restart | sail restart | ./laradock restart |
| Rebuild images | sail build --no-cache | ./laradock rebuild |
| Open a shell in the app container | sail shell / sail root-shell | ./laradock workspace / ./laradock workspace --root |
| Run Artisan | sail artisan migrate | ./laradock exec workspace php artisan migrate |
| Run Composer | sail composer require ... | ./laradock exec workspace composer require ... |
| Run a raw PHP command | sail php script.php | ./laradock exec workspace php script.php |
| Run Node / NPM | sail npm run dev | ./laradock exec workspace npm run dev |
| Run the test suite | sail test | ./laradock test (auto: artisan → pest → phpunit) |
| Browser tests | sail dusk | ./laradock start selenium + ./laradock test |
| REPL | sail tinker | ./laradock exec workspace php artisan tinker |
| Open a database shell | (connect manually with creds) | ./laradock db (auto-detects MySQL/MariaDB/Postgres) |
| Open the app in a browser | (type http://localhost) | ./laradock open (or open mailpit, open phpmyadmin) |
| Public URL for your local site | sail share | ./laradock share (cloudflared / ngrok) |
| Preview sent emails | Mailpit UI (bundled) | ./laradock start mailpit → ./laradock open mailpit |
| See what's running | sail ps | ./laradock info |
| Change PHP version | edit compose.yaml + sail build | ./laradock set PHP_VERSION=8.4 + ./laradock rebuild |
| Add a service | sail add (from Sail's menu) | ./laradock start {service} (100+ available) |
| Deploy to production | not supported (dev-only) | ./laradock ship → server / Kubernetes / cloud |
| Drop to raw Docker | sail hides it | ./laradock <anything> passes straight to docker compose |
Two differences worth noting: Sail bundles every tool call under the sail verb, while Laradock keeps your dev tools (artisan, composer, npm) inside the workspace shell, so a single ./laradock workspace drops you where they all live, and you type them exactly as you would anywhere else. And where Sail stops at your laptop, the same Laradock stack keeps going all the way to production.
Choose Sail if...
- Your app is pure Laravel and your stack is inside Sail's menu.
- You value "official" and minimal above everything else.
- Your team already knows the
sailcommand by heart.
Choose Laradock if...
- You need anything beyond Sail's list: RabbitMQ, Kafka, Elasticsearch clusters, ClickHouse, vector DBs, local LLMs, monitoring; with Laradock each one is a single
upcommand away. - You also work on non-Laravel projects and want one environment for all of them.
- You want a production-style web server (NGINX/Apache/Caddy) instead of
artisan servein a container. - You maintain legacy apps on PHP 5.6/7.x that Sail cannot run.
- You prefer no wrapper: what you learn is plain Docker Compose.
- You want the same stack to reach production. Sail is explicitly dev-only; Laradock's
./laradock shipbuilds a hardened image of your app and deploys it to a single server, Kubernetes (EKS/GKE/AKS), or a managed cloud (AWS ECS, Cloud Run, Fly), the exact containers you developed against. See Deploy to Production.
Already on Sail? The service names even match
Sail and Laradock both call the containers mysql and redis, so your app's .env barely changes.
- Export your database while Sail still runs:
./vendor/bin/sail exec mysql mysqldump -uroot -ppassword laravel > backup.sql(adjust db name/creds to your.env). - Stop Sail:
./vendor/bin/sail down - Add Laradock inside your project:
git clone https://github.com/laradock/laradock.git && cd laradock && cp .env.example .env - Start your stack:
./laradock start nginx mysql redis workspace(ordocker compose up -d nginx mysql redis workspace) - Import the database:
./laradock exec -T mysql mysql -uroot -proot default < ../backup.sql - Update your app's
.env:DB_HOST=mysqlandREDIS_HOST=redisstay the same; changeDB_DATABASE/DB_USERNAME/DB_PASSWORDto Laradock's (inmysql/defaults.env) or set yours in Laradock's.env. - Optional cleanup once you are settled:
composer remove laravel/sail --devand delete Sail'scompose.yaml.
Frequently Asked Questions
Is Laravel Sail free?
Yes. Sail ships as a Composer dev-dependency with every new Laravel install and is fully free and open-source (MIT license), maintained by the Laravel team.
Does Sail only work with Laravel?
Yes, Sail is built specifically for Laravel applications; it is not a general-purpose PHP Docker tool. For non-Laravel PHP projects (Symfony, WordPress, plain PHP), you need something framework-agnostic like Laradock.
What services does Sail support?
Sail's installer offers a curated list including MySQL, PostgreSQL, MariaDB, MongoDB, Redis, Valkey, Memcached, Meilisearch, Typesense, MinIO, Mailpit, RabbitMQ, and Selenium, roughly 15 services, selected at install time via sail:install or added later with sail:add.
Can I add a service to Sail after installing?
Yes, run php artisan sail:add and pick additional services from the same menu sail:install uses; it updates your compose.yaml and re-runs the environment wiring.
Is Sail slow on macOS or Windows?
It can be: Sail's file-sharing performance depends entirely on Docker Desktop's bind-mount speed, a known pain point for vendor/-heavy PHP projects. Recent Docker Desktop VirtioFS improvements help significantly; this is a Docker Desktop limitation, not specific to Sail or Laradock.
See the full landscape, including DDEV, Herd, Lando and XAMPP: Laradock vs Others. Ready to try it? Getting Started takes about five minutes.