Future-proof your tech-skills with Linux, Python, vim & git as I share with you the most timeless and love-worthy tools in tech — and on staying valuable while machines learn... and beyond.

WSL & LXD Let Us Run Generic Linux Server-Build Scripts Without Docker

by Mike Levin

Wednesday, December 21, 2022

You will find various anti-patterns here. Among the biggest is that I don’t think you should focus on Docker. There’s better container tech, the sort that doesn’t lock-down system-space and force you to use a kooky compositing system API. You should just be able to install software to your hearts content, as if it were a real system.

Therefore, my container preference is LXD from Canonical, the same people who brought us Ubuntu and the distro-independent snap installer. But most people are on Windows and Microsoft’s Windows Subsystem for Linux (WSL) already is a container system and on 3/4 of the world’s desktops. It’s the tech that comes with Windows that Docker relies upon, minus the Docker. So let’s use it!

To leverage WSL, I prefer “server build scripts”. With Windows offering something close to standard generic Linux comes the support for standard generic Linux installers. It’s now easy to bottle-up some type of server, expressing and distributing it as an install script. This trick works because of lowest common denominators. You know all Windows 10 and 11 systems have certain things available to everyone, such as the Linux subsystem.

Thanks to those quite high lowest common denominators, anyone on Windows 10 or 11 can do this trick. WSL now supports Linux graphics (across Windows 10 & 11) and Linux services (called systemd) which install scripts can get running. This leads to nice little Linux servers running in the background right on your Windows laptop that you can get in and hack.