Docker and WSLv2 Up and Running on Windows 10

Brief chronicle of my recent reinstall of Docker on one of my Windows 10 systems.

Note: This builds on my chronicle of installing WSLv2, you’ll need to install WSLv2 before this process will work for you.

Note: I’m particularly interested in using Docker with WSLv2 as the back-end, as such that is all that is covered in this post. There are other ways to use Docker with VM back-ends.

  • Download Docker Desktop from Docker’s site.
  • Run installer and accept default options.
  • Once the system reboots, Docker should be running using WSLv2 as the back-end (well, that was easy and has become a lot easier than it was in the past!).

Its worth noting that during the install process Docker enabled Microsoft’s Virtual Machine Platform (See under Control Panel –> Programs and Features –> Turn Windows Features On or Off) but that Containers, Windows Hypervisor Platform, and Windows Sandbox all remain off.

Windows Subsystem for Linux version 2 Up and Running on Windows 10

Just a brief chronicle of my recent reinstall of WSLv2 on a Windows 10 system.

Note: Hyper-V was already installed and active on my system, but other virtualization related features including Containers, Virtual Machine Platform, Windows Hypervisor Platform, and Windows Sandbox were not.

  • Control Panel -> Programs and Features -> Windows Subsystem for Linux
  • I want to use WSLv2 so before anything else I downloaded the kernel update from Microsoft.
  • Open Command Prompt as an Administrator and run wsl --set-default-version 2.
    • By default, WSL uses v1 to v2 instance can take a while, so we avoid that conversion process by telling WSL to use v2 for everything by defualt.
  • Open Windows Store, search for Ubuntu, install Ubuntu 18.04.
  • Create a username and password and I’m up and running (that was easy).
  • Grab the latest updates while I’m at it sudo apt update && sudo apt upgrade.