- What is Laravel Sail and do I need Docker experience to use it?
- Laravel Sail is Laravel's first-party Docker-based local development environment. It ships Dockerfiles, Docker Compose service stubs, and a thin sail CLI that wraps docker compose exec. You do not need prior Docker experience to use it, and it works on macOS, Windows with WSL2, and Linux. It is installed as a dev-only Composer dependency.
- How do I install Laravel Sail in an existing Laravel app?
- Add it to require-dev with composer require laravel/sail --dev, then run php artisan sail:install --with=mysql,redis,mailpit. New Laravel applications already require Sail, so many teams have it without making an explicit decision. Pass an explicit --with list to avoid interactive drift, and commit the generated compose.yaml to version control.
- Does Laravel Sail work in production?
- No. Sail is a dev-only dependency intended for local development, not staging or production deployment. It has no runtime footprint, no service provider bootstrapping in production, and no schema or config surface. Keep it clearly documented as dev-only so it does not leak into production guidance.
- Which PHP versions and Laravel versions does Laravel Sail support?
- Sail's Dockerfiles cover PHP 8.0 through 8.5, and Laravel 12 and 13 are explicitly supported. It is a best fit for Laravel 10+ application repos. The runtime Dockerfiles live under vendor/laravel/sail/runtimes/<php-version>/, so check that your supported PHP versions are in that matrix.
- Which services can I enable with sail:install?
- You can enable services with php artisan sail:install --with=... The supported set includes MySQL 8.4, PostgreSQL 18, MariaDB, MongoDB, Redis, Valkey, Memcached, Meilisearch, Typesense, MinIO/rustfs, RabbitMQ, Selenium/Playwright, and Swoole. Always pass the explicit list you need instead of relying on interactive prompts.
- Why does my Sail container build fail after a fresh clone with --no-dev?
- Sail's compose file typically points build.context into vendor/laravel/sail/runtimes, so a clone without vendor cannot build the image. That breaks clone-and-go in CI or --no-dev environments. The fix is to copy the runtime Dockerfile into docker/<php-version>/Dockerfile, commit it, and repoint build.context and dockerfile. This removes the vendor-path coupling and is the highest-leverage change to mandate.
- Should I pin laravel/sail or use a caret range?
- Use a caret range with a committed lockfile, or an explicit pin plus a scheduled bump. Sail 1.x minor releases routinely bump base images such as MySQL 8.0 to 8.4 and PostgreSQL 17 to 18, and can rename artifacts like docker-compose.yml to compose.yaml. Unpinned upgrades can silently break a working local environment, so treat Sail upgrades like any other dependency change.
- Does Laravel Sail work on Windows and macOS?
- Yes. Sail supports macOS, Windows via WSL2, and Linux, with Docker Desktop commonly used on macOS and Windows. On Linux, watch for host/container UID and volume permission mismatches, especially with bind-mounted vendor directories. Larger organizations should also account for Docker Desktop licensing thresholds.
- What are alternatives to Laravel Sail, like DDEV or Devcontainers?
- Common alternatives include DDEV, Devcontainers, a hand-rolled Docker Compose stack, and legacy Homestead/Vagrant setups. Sail ships a devcontainer stub, so it is not mutually exclusive with Devcontainers. Choose based on your organization's existing standards; Sail is strongest where developers currently juggle Valet, Homestead, or local PHP installs.
- Why does laravel/sail show zero dependents and is it widely used?
- The zero dependents figure is an artifact of Sail being a dev-only package, not a sign of low adoption. It is first-party and default-installed in nearly every new Laravel application. Read star counts and adoption scores as understating dev tooling rather than as weak-adoption signals.