Tools Products Blog About Toggle Theme

Revolutionizing Containerization: Windows 11 Gets Native Linux Container Support (No Docker Needed!)

By | Updated:
Linux on Windows Public Preview WSLC.EXE // MOBY RUNTIME // FALL 2026 GA

Native Linux Containers on Windows 11: Hands-On with WSL Containers (`wslc`), Moby, and Direct GPU Passthrough

Windows 11 is dismantling its mandatory dependence on Docker Desktop. Through the public preview of WSL Containers, developers can build, run, and manage OCI-compliant Linux containers directly via a native first-party CLI (wslc.exe) and C#/C++ runtime APIs. Backed by isolated Hyper-V microVMs, virtiofs accelerated I/O, and zero-overhead CUDA GPU passthrough, here is how Windows 11 turns the terminal into a cloud-native powerhouse.

8 Min Read
CLI & API Integration
Moby Engine & VirtioFS
WSL Containers running natively in Windows 11 with wslc.exe
Running lightweight Linux containers natively in Windows 11 via wslc.exe, eliminating third-party hypervisor overlays.
FIGURE 1.0 // NATIVE CONTAINERIZATION

Hardware Hyper-V Isolation

Every application and CLI session operates within its own hardware-enforced microVM boundary, guaranteeing enterprise zero-trust containment.

VirtioFS & Consomme

Features 2x faster cross-OS file access speeds via VirtioFS, paired with Consomme network routing for seamless VPN and corporate proxy tunneling.

Native Dev Containers

VS Code Dev Containers natively targets wslc with zero reinstallation, while IT admins control registries via ADMX and Intune policies.

What Exactly is WSL Container in Windows 11?

Contrary to speculative rumors of a "WSL 3," WSL Containers is a focused extension of the Windows Subsystem for Linux platform. It provides first-party OCI-compliant container runtime capabilities directly into the Windows NT kernel and userland without the requirement of third-party virtualization daemons like Docker Desktop or Podman.

Under the hood, WSL Container utilizes Moby—the open-source core that powers Docker itself. Rather than inventing an incompatible container format, Microsoft is giving Windows a native bridge into the global container ecosystem through two primary conduits:

CLI
wslc.exe / container.exe

A native command-line binary mapped to system PATH. Syntax is immediately familiar to Docker users: wslc run, wslc build, wslc ps, and wslc image ls.

API
WSL Container NuGet API (C, C++, C#)

Allows Windows developers to silently spin up a headless Linux microVM, execute complex Linux-only rendering or computation binaries, and tear down without the end user knowing Linux ran.

Real-World API Demonstration: Moonray
Microsoft showcased DreamWorks' open-source Hollywood rendering engine, Moonray (used in blockbuster films like The Wild Robot). Running inside a Windows application via the WSL Container API, the Linux ray-tracer computed photorealistic frames with zero UI latency, communicating seamlessly with DirectX 12 render targets.

How to Install and Initialize WSL Containers

WSL Container is currently available through the official pre-release ring of WSL. No Copilot+ NPU hardware is required, though your CPU must have hardware virtualization (VT-x or AMD-V) enabled in the UEFI firmware. Follow these terminal steps:

01
Update to the Pre-Release WSL Channel

Open Windows Terminal as Administrator and execute:

wsl --update --pre-release
02
Restart the Subsystem Daemon

Terminate running WSL instances to reload the kernel hypervisor drivers:

wsl --shutdown
03
Verify Binary & Version String

Ensure version 2.9.3.0 or higher is registered in your PATH:

wslc --version
wslc --help

Hands-On: Building Custom Images & Port Forwarding

To assess production readiness, we tested building custom microservices with a standard Containerfile (identical syntax to Dockerfile):

FROM python:3.12-slim

RUN apt-get update && \
    apt-get install -y --no-install-recommends \
        file exiftool binutils bsdmainutils coreutils && \
    rm -rf /var/lib/apt/lists/*

WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY app.py .

EXPOSE 5000
CMD ["python", "app.py"]

Compiling and launching the container is instantaneous, with layer caching reducing re-build cycles to sub-second durations:

# Build custom image
wslc build -t inspector-tool .

# Run with localhost port mapping
wslc run -d -p 5000:5000 --name inspector-app inspector-tool

Browsing to http://127.0.0.1:5000 in Microsoft Edge on Windows immediately surfaces the Linux Flask web application—requiring zero subnet bridging or virtual switch tinkering.

GPU Passthrough: Zero-Overhead CUDA & PyTorch Acceleration

For machine learning practitioners, containerized GPU access is non-negotiable. WSL Containers passes host NVIDIA GPUs into the microVM via the standard --gpus all syntax:

wslc run --rm --gpus all pytorch/pytorch:2.5.1-cuda12.4-cudnn9-runtime \
  python -c "import torch; print('CUDA Available:', torch.cuda.is_available()); print('Device:', torch.cuda.get_device_name(0))"

In benchmark tests, compiled tensor models (torch.compile) executed with identical throughput and memory bandwidth as bare-metal WSL2 setups, proving that the Hyper-V microVM encapsulation introduces virtually zero compute penalties.

Enterprise Governance & Should You Ditch Docker Desktop?

Microsoft has engineered WSL Containers with large enterprise fleets in mind:

  • Registry Allowlisting: IT administrators can enforce Group Policy / Intune ADMX rules restricting image pulls exclusively to authenticated corporate registries (e.g. Azure Container Registry, private Artifactory) while blocking public Docker Hub downloads.
  • Microsoft Defender for Endpoint: Container lifecycle events (start, exec, image build) are parsed directly by Defender, alerting SOC teams to unauthorized binary executions.
  • VS Code Dev Containers: Developers can point the "Docker Path" setting directly to wslc, continuing their normal development loops inside isolated containers.
The Docker Desktop Verdict:
For single-container microservices, database spin-ups, and local CLI tools, wslc is already a lighter, license-free alternative. However, multi-container orchestration requiring docker-compose.yaml, GUI dashboard inspections, and commercial extensions still favor Docker Desktop for complex multi-tier stacks.

Expert Perspective: The Bottom Line

WSL Containers represents a monumental turning point for the Windows development story. By integrating OCI containerization natively into the operating system fabric—paired with virtiofs file performance and Hyper-V isolation—Microsoft has transformed Windows 11 into a first-class Linux development workstation.

Targeted for General Availability in Fall 2026, WSL Containers is not just a competitor to third-party tools; it is the modern foundation upon which Windows enterprise development will thrive for the next decade.

Optimize Your WSL2 Virtualization & Memory Bounds

Running high-memory containers or local LLMs inside WSL? Access our system performance utilities to fine-tune your .wslconfig, allocate vCPU cores, and audit Hyper-V virtualization parameters.

WSL Tuning & Diagnostics

Comments

Post a Comment