MirrorNest
← Tous les guides

WSL2 + Docker Desktop on Windows 11

Run a real Linux kernel alongside Windows and containerize workloads with Docker Desktop -- the standard dev environment setup for Windows 11.

Système : Windows 11 (or Windows 10 2004+)DevelopmentContainersSite officiel ↗Documentation officielle ↗
Ce guide est élaboré à partir de la documentation officielle de WSL2 + Docker Desktop on Windows 11, dont le lien figure ci-dessus — vérifiez toujours les noms exacts des paquets/versions avant d'exécuter ces commandes sur un serveur de production, car les versions de la distribution et du projet évoluent avec le temps.
  1. 1Install WSL2

    Open PowerShell as Administrator and run the built-in installer -- it enables the required Windows features, downloads a Linux kernel, and installs Ubuntu by default.

    wsl --install

    A restart is required after this command finishes.

  2. 2Complete the Ubuntu first-run setup

    After restarting, Ubuntu launches automatically and asks for a new UNIX username and password for that Linux environment.

  3. 3Install Docker Desktop

    Run the installer, keep "Use WSL 2 instead of Hyper-V" checked (the default on Windows 11), and restart when prompted.

  4. 4Enable WSL integration for your distro

    In Docker Desktop's Settings > Resources > WSL Integration, enable integration for your installed Ubuntu distro, then verify from inside it.

    docker run hello-world