Skip to content

WSL containers — Mission

I use Docker Desktop and Podman on the same Windows machine, each with its own WSL VM. Microsoft now builds a container tool directly into WSL: wslc.exe. I want to know whether it can replace — or complement — Docker Desktop for my daily use, and how to use it from my own applications.

By the end of this course, I will be able to

Section titled “By the end of this course, I will be able to”
  • explain what WSL containers is and how it relates to WSL 2 and Docker Desktop;
  • install the right version of WSL and diagnose a failed installation;
  • run, inspect, publish and stop containers with wslc;
  • build an image from a Containerfile;
  • decide when to use wslc rather than Docker Desktop.
  • Windows 11 with WSL 2 installed.
  • Basic container concepts (image, container, port) — lesson 1 reviews them.
  • A PowerShell terminal; administrator access to update WSL.
  1. Concepts — containers, WSL 2, and where wslc fits.
  2. Installation — switch to pre-release, verify, troubleshoot.
  3. First containersrun, ports, exec, stop.
  4. Building an image — a C# API and a Spring Boot WebFlux API: multi-stage Containerfile, build, logs, cleanup.
  5. wslc or Docker Desktop? — comparison and API for Windows applications.
  6. Journal — my attempts, errors and items to verify.