Microsoft has some extensions that make working with your WSL filesystem very easy.
VS Code is the absolute easiest editor to use with this setup.This is because the WSL2 distros have no init system, so Docker doesn't auto start.
Running lando start should automatically start Docker, but if you need to initialize Docker for non-Lando purposes, try running sudo service docker start.
see the Microsoft docs on installing the kernel update open in new window.
You don't need to have Windows 10 Pro like the traditional Lando on Windows setup, as WSL doesn't require it. If you're not sure, you can check this in Task Manager open in new window. Make Sure Your Machine Supports Virtualization You also need to ensure your machine supports virtualization (Vt-d, etc.).
It is very sad, very frustrating, so if you are here, do yourself a favor and uninstall the Docker Desktop WSL2 backend.Ģ. If you have this setup, you're going to have a bad time open in new window. Uninstall Pre-existing Docker + WSL2 Backend You will want to make sure that, if you have an existing Docker or WSL setup, you are not using the Docker + WSL2 backend. Here is the best (highest performance) way to setup Docker (and Lando) on a Windows 10 machine in 2021: # Prerequisitesġ. WSL2 manages to bypass the majority of this performance penalty by never mounting your source code on a non-Linux filesystem. Sharing files across the boundary between your native OS and the Linux OS running within this virtual environment creates significant performance issues. Traditionally, running Docker on Mac or Windows requires a virtual machine environment. Longtime Mac or Windows Lando users will be familiar with the performance difficulties associated with file system access when using Docker in a non-linux host environment. WSL2 provides a near-native Linux experience for developing web applications on Windows computers.