Microsoft Launches WSL Containers Public Preview With Docker-Like CLI and GPU Support


wsl containers
Image credit: Microsoft

Microsoft has released WSL Containers in public preview, giving Windows developers a built-in way to build, run, and manage Linux containers without relying on Docker Desktop for many common workflows.

The release arrives just after Microsoft clarified that WSL Containers are not “WSL 3,” ending speculation surrounding the new feature.

The preview is available through the latest pre-release version of Windows Subsystem for Linux. Developers can install it by running wsl –update –pre-release, which adds a new container command-line tool named wslc.exe alongside a programmable API for Windows applications.

A familiar container experience for Docker users

Microsoft designed wslc.exe to feel familiar to developers who already work with Docker and other container platforms. The syntax closely matches existing container tools, reducing the learning curve for users moving to WSL Containers.

The CLI also ships with a built-in alias called container.exe, giving developers another way to access the same functionality.

Developers can even launch a complete Ubuntu KDE desktop inside a Linux container by exposing the required ports, showing that WSL Containers can handle far more than simple command-line applications.

GPU acceleration brings AI workloads to Windows containers

One of the most notable capabilities is built-in GPU support.

By passing the –gpus all flag, containers can access the host system’s graphics hardware, allowing machine learning frameworks such as PyTorch to use GPU acceleration directly from inside Linux containers running on Windows.

This built-in GPU access removes another layer of setup that developers previously handled through third-party container environments.

New API lets Windows apps embed Linux containers

Alongside the CLI, Microsoft introduced a new WSL Container API that allows Windows developers to integrate Linux container functionality directly into native applications.

Instead of launching external command-line tools, applications can programmatically create sessions, pull container images, start containers, and interact with running Linux processes.

The company has already integrated the technology into development tools including MSBuild and CMake, allowing developers to define container operations directly inside project files rather than relying on external scripts.

Faster file sharing and improved networking are on the way

Microsoft is also preparing additional improvements for future WSL releases.

A new default file system based on virtiofs aims to improve file sharing performance between Windows and Linux environments, reducing one of the longstanding bottlenecks for WSL users.

The company is also testing an experimental networking mode called consomme, which routes Linux networking through Windows to improve compatibility with enterprise VPNs and corporate networking environments.

Better isolation through lightweight virtual machines

Although WSL Containers build on Windows Subsystem for Linux, they do not execute inside a standard WSL distribution.

Instead, each application or CLI session creates its own lightweight Hyper-V utility virtual machine in the background.

Microsoft says this architecture improves security by isolating workloads, making it harder for one application’s containers to inspect or interfere with another application’s environment.

Microsoft’s Linux strategy continues to evolve

The public preview represents another step in Microsoft’s ongoing embrace of Linux and open-source development.

The company has also continued expanding its Linux investments with the recent release of Azure Linux 4.0, reinforcing a sharp shift from its historical stance toward Linux.

More about the topics: microsoft, WSL

Readers help support Windows Report. We may get a commission if you buy through our links. Tooltip Icon

Read our disclosure page to find out how can you help Windows Report sustain the editorial team. Read more

User forum

0 messages