Member-only story
How to use Laravel Sail with the Docker Desktop WSL 2 backend
Laravel development on Windows has never been easier

In general, Docker and containers are something every developer has to get familiar with sooner or later. Let’s take a look at installing Docker Desktop on Windows 10, how it integrates with Windows Subsystem for Linux (WSL) 2, and how to use Laravel’s new command-line tool Laravel Sail to get up and running with Laravel in no time.
Prerequisites
- Windows 10, version 1903 or higher
- Windows Subsystem for Linux (WSL) 2
1. Install Docker Desktop
First, make sure you have the prerequisites installed before continuing with the installation. You can find instructions on how to enable WSL 2 in this article:
Download and follow the usual installation instructions to install Docker Desktop; when prompted, make sure the checkbox for “Install required Windows components for WSL 2” is checked.

When the Docker Desktop installation has finished, you should have access to docker
from within WSL.

If this command, for some reason, isn’t working for your distribution.
- Open Docker Desktop.
- Go to Settings > Resources > WSL Integration.
- Enable integration with your distribution.
- Click Apply & Restart.