Overview and Background of WSL Container

On June 29, 2026, Microsoft released the public preview of “WSL Container” in WSL 2.9.3 pre-release. This allows building and running Linux containers directly on Windows without relying on Docker Desktop. Previously, WSL 2 mainly served as an environment for running Linux distributions, but the new feature natively integrates a container runtime to simplify development workflows.

📑Table of Contents
  1. Overview and Background of WSL Container
  2. Installation Method and Prerequisites
  3. Basic Usage and CLI Commands
  4. Comparison with Docker Desktop and Migration Points
  5. Limitations and Future Outlook
  6. Frequently Asked Questions

The background of this change is heavily influenced by developer feedback. Many users pointed out the overhead of Docker Desktop and sought lighter alternatives. According to Microsoft’s official Command Line Blog and Learn documentation, WSL Container was announced at Build 2026 with the goal of deeply integrating Linux container development into Windows. Source: https://devblogs.microsoft.com/commandline/wsl-container-is-now-available-for-public-preview/


Installation Method and Prerequisites

To get started, you need WSL 2.9.3 or later in the pre-release channel. Run the following steps from the command line.

Open PowerShell or Command Prompt as administrator. Then execute wsl --update --pre-release. You can also download directly from GitHub, but the update command is recommended. After updating, verify with wsl --version that you have 2.9.3 or later.

As a prerequisite, confirm that WSL 2 is enabled. Enable Hyper-V and WSL via “Turn Windows features on or off”. If you plan to use GPU passthrough or file mounts, ensure the corresponding drivers are installed.


Basic Usage and CLI Commands

The new CLI tool wslc.exe is added. Basic operations are as follows.

Build a container: wslc build -t myimage .

Run a container: wslc run myimage

Redirecting stdin/stdout and mounts are also supported. For programmatic access from Windows apps, use the WSL Container API NuGet package. Operations such as pull, run, stdin/stdout, and GPU access are available.

For example, you can check sample code for launching containers from Python scripts in the Microsoft Learn tutorial. Source: https://learn.microsoft.com/en-us/windows/wsl/wsl-container


Comparison with Docker Desktop and Migration Points

WSL Container is not a complete replacement for Docker Desktop, but it can sufficiently substitute core functions. The main differences are ease of installation and the absence of a GUI.

Item WSL Container Docker Desktop
Installation wsl –update –pre-release Dedicated installer
CLI wslc.exe docker CLI
GUI None Available
Dependency WSL 2 only Hypervisor + WSL
Cost Free Free for personal / paid plans

The migration point is that existing Dockerfiles can be used as-is. However, compatibility with Docker Compose and GUI tools is limited at this time. Source: Microsoft official documentation (as of June 2026)


Limitations and Future Outlook

Because it is in public preview, use in production environments is not recommended. The primary purpose is feedback collection. GPU support and mount functions are available, but stability is expected to improve in future updates.

Looking ahead, Microsoft is considering API extensions and improved Compose compatibility. Feedback from developers is accepted through official channels.


Frequently Asked Questions

Q: Does WSL Container completely replace Docker Desktop?

It can substitute core functions, but compatibility with Docker Compose and GUI tools is limited at this time.

Q: Is additional installation required for an existing WSL 2 environment?

Updating to the latest pre-release version with WSL –update –pre-release is sufficient.

Q: Are GPU and file mounts supported?

Yes, GPU passthrough and mounts are possible via the WSL container API.

Q: Can it be used programmatically from Windows apps?

The WSL container API NuGet package supports operations such as pull/run/stdin/stdout.

Q: Is it recommended for production use?

It is currently in public preview, so the main purpose is feedback collection. Use in production should be done with caution.

Related articles:

krona23

Author

krona23

Over 20 years in the IT industry, serving as Division Head and CTO at multiple companies running large-scale web services in Japan. Experienced across Windows, iOS, Android, and web development. Currently focused on AI-native transformation. At DevGENT, sharing practical guides on AI code editors, automation tools, and LLMs in three languages.

DevGENT about →

Leave a Reply

Trending

Discover more from DevGENT

Subscribe now to keep reading and get access to the full archive.

Continue reading