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. đŸ™‚

Best of FreeBASIC IDE’s, Tools, Libraries, Resources, and More

FreeBasic?

FreeBasic is a free and open source compiler that works with Windows, DOS, and Linux. It includes a QuickBasic emulation mode but also has many features of contemporary languages. The most recent version is 1.06 from Feb. 18, 2019. Development appears to have slowed to a crawl.

Integrated Development Environments

winFBE

  • Last Release: 2019
  • Version Control Repository: GitHub
  • Notes:
    • Written by Paul Squires who is also the author of (the now deprecated) JellyFB and Firefly Visual Designer.
    • Written by Paul Squires who has written several other IDE’s for FreeBASIC.
  • UI feels more modern.

FBedit (Author: Ketil Olsen, KetilO)

An IDE for FreeBasic built on RadASM, an IDE that was originally written for Assembly, also by Ketil.

  • Last Release: 2009
  • Version Control Repository: SourceForge
  • Notes:
    • The repository has seen some activity over the years, but the only “release” appears to be from 2010 – 1.0.7.6c.
    • I’m particularly fond of:
      • simplicity of the user interface
      • window showing all functions within app.
      • ease with which one can compile/run apps from the IDE.
    • Unfortunately, while there have been a number of websites, including fbedit.freebasic.net, none of them are functional. You can view an old copy of one site at The Wayback Machine.
    • There are several forks of FBEdit, none of which I have had opportunity to try including FBEdit Mod (SVN) and a fork of this fork, FBEdit Mod (Cherry Version) (GitHub)

FBide

  • Last Release: 2013
  • Version Control Repository: SourceForge
  • Notes:
    • There is a functioning website hosted by freebasic.net unlike FBedit.
    • Features include autoformatting, auto code indenting, configurable syntax highlighting, compile error reporting, code browser, etc.

Discontinued

  • Firefly Visual Designer (by Paul Squires)- No updates since 2016, appears that WinFBE is its planned replacement.
    • Similar to Microsoft’s Visual Basic IDE.
  • JellyFB (by Paul Squires)- No updates since 2010, appears to be deprecated in favor of WinFBE.

Other IDEs

  • PosideonFB – Last Updated: 2019.
  • wxFBE – Last Updated: 2013.
  • FbEditMOD – Last Updated: 2016.
    • Fork of KetilO’s FbEdit.

Libraries

Debuggers

Testing

  • fbcunit – Last updated was 10/2018.

Resources

You Should Know This…

Deark and QuickBasic

I had an old QuickBasic game with .VGA files in it. What are .VGA files? Some sort of image format. Eventually I was able to determine that these were BSAVE files, but how to move them to something current?

Enter Deark (free and open source), a command-line utility that can decode files in one format and convert them into another.

I dropped deark.exe into the same folder as my QuickBasic game (and that of the relevant .VGA files) and entered the following command:

deark name_of_file.vga -opt bsave:fmt=wh16

The above command instructs deark to attempt to decode name_of_file.vga. But Deark can’t decode it without a little more help, which is why we have to define an option (-opt).

The bsave option tells Deark that this is definitely a BSAVE file and then specifies the type of BSAVE file it is (fmt=wh16). Deark provides a handy list of file formats and the relevant options.

I’d also recommend at least perusing readme.txt before using Deark.