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.

Windows Package Managers

(This article is a somewhat rambling thought piece on the various package managers currently available for Windows. Unlike a lot of what I post don’t expect to walk away from this with step-by-step guidance or a recommendation on the best option…this will probably be of most interest to those seeking to understand the current landscape)

One of the tools that has been sorely missing from Microsoft’s Windows is a robust package manager that is as ubiquitous as, say, Ubuntu/Debian’s apt/apt-get.

That isn’t to say a few options haven’t been available. The most popular being Chocolatey. A fairly extensive list of lesser-known alternatives can be found on AlternativeTo. Chocolatey is the one I’ve used most extensively.

Recently Microsoft has announced winget (Windows Package Manager) which is exciting due to its backing by Microsoft but has already been embroiled in controversy. Hopefully Microsoft will work things out with AppGet author Keivan Beigi and, as appropriate, make things right.

For me there is some hesitancy to adopt Microsoft’s new winget apart from this controversy – it isn’t the first time Microsoft has released a package manager (see OneGet/PackageManagement).

But I gave it a try anyway. Unfortunately, at least for the moment, I’m putting further experimentation on hold. Why? Well, I tried to install Windows Terminal, one of the examples in the blog post announcing Windows Package Manager: winget install terminal and received the following:

Multiple apps found matching input criteria. Please refine the input.
Name                     Id                               Version
Windows Terminal         Microsoft.WindowsTerminal        1.0.1401.0
Windows Terminal Preview Microsoft.WindowsTerminalPreview 1.0.1401.0

Okay, not ideal, but I think I can fix this. So I run winget install "Windows Terminal" – same message. What about winget install --name "Windows Terminal" – nope, that doesn’t work either. Maybe winget install --id "Microsoft.WindowsTerminal" – nope. Well, those were really my only hope since the version appears the same for both. I’m finally able to get it to install using winget install --name "Windows Terminal Preview".

None of this is overwhelmingly difficult, but in conjunction with uncertainties about winget’s future and the controversy over its origins, I’m turning my attention back to chocolatey at least for the moment.

That said, Chocolatey has several significant deficiencies, imho, many of which are fixed in either their Professional or Business (paid) editions. I’m not opposed to paying for Chocolatey but the Professional version starts at $96 and the Business version at $640 are quite steep for an individual license (technically, these cover 8 and 40 systems respectively, but I’m a single individual!).

What are these deficiencies? There two primary ones: (1) the slow speed of Chocolatey installs and general verboseness and (2) the lack of integration with Windows Add/Remove Programs.

In addition, the ChocolateyGUI has, in my past experience, been too slow to be highly useful to me (at least as someone who knows how to use the CLI).

There is one other major package manager for Windows – Scoop. Unfortunately, the website lacks detailed information and a directory of packages as one finds with Chocolatey.

So we now have three less-than-ideal options for package management. To conclude this post I’d like to suggest to each what could be done to “take the lead” so to speak:

  • Chocolatey
    • Move the integration with Program Features into the free edition.
    • Consider offering another edition of Chocolatey for individual users that provides additional functionality at a lower cost ($10-$20?).
    • Consider including the functionality (at least most of) currently exclusive to business into Professional (with some usage limitations).
    • Consider whether to offer a script-free option for installations similar to AppGet/WinGet that will be friendlier for consumers.
    • Provide a native and speedy GUI app (to attract consumers).
    • Consider including all premium functionality in the free version and only charging for the package building functionality.
  • Scoop
    • Add a browsable directory of available packages to the website.
    • Add a more consumer-oriented section to the website.
  • Winget
    • Clear up the controversy regarding AppGet/Winget, offer mea culpa if appropriate.
    • And an uninstaller is an absolute requirement.
    • Keep cranking away at improving the product.

Okay, so I guess most of my suggestions are for Chocolatey. 🙂