Microsoft has made WSL Containers generally available, giving Windows developers a built-in way to build, run, and manage Linux containers without installing Docker Desktop. Announced on September 29, 2026, the feature adds a dedicated command-line interface and an API for Windows applications to work with Linux containers through the Windows Subsystem for Linux (WSL).

For developers who want to run Linux-based applications, test container images, or build local development environments, this offers another option alongside Docker Desktop. Instead of installing a separate desktop container application, you can update WSL and use its built-in wslc command-line tool.

In this guide, you’ll learn what WSL Containers does, how to enable it, how to run your first Linux container, and how to launch a web server that you can access directly from Windows.

What Is WSL Containers?

Updating WSL to version 3.0.1 to get Containers in general availability

WSL Containers is a container feature built into the Windows Subsystem for Linux. It provides two main components:

  • WSL Containers CLI (wslc.exe): A command-line tool for downloading images, building container images, starting containers, viewing logs, and managing running workloads.
  • WSL Containers API: A programming interface that allows Windows applications to launch and interact with Linux containers programmatically.

The feature uses WSL’s Linux environment to run Linux containers on Windows. Its command-line interface follows familiar container workflows, making it easier for developers to get started without learning an entirely new approach.

Microsoft also provides a built-in container.exe alias for running familiar container commands.

Official announcement: https://blogs.windows.com/windowsdeveloper/2026/09/29/wsl-containers-now-generally-available/

Why Run Linux Containers Without Docker Desktop?

Docker Desktop has long been a popular way to run Linux containers on Windows. However, not every developer needs its graphical interface or additional desktop tooling.

WSL Containers provides an alternative for users who prefer working from a terminal.

Its main advantages include:

  • No separate Docker Desktop installation: The container CLI is included with a supported WSL installation.
  • A familiar command-line workflow: Pull images, run containers, publish ports, and inspect workloads from PowerShell or Windows Terminal.
  • Local development: Run Linux applications and web services directly on your Windows computer.
  • Container image building: Build your own images from a Containerfile and run them locally.
  • Windows application integration: The API lets developers incorporate Linux container workloads into native Windows applications.
  • Support for AI and GPU workloads: WSL Containers can support compatible GPU-enabled container workflows, depending on the hardware, drivers, and image requirements.

There are some important distinctions, however. WSL Containers maintains its own image store, so images previously downloaded through Docker Desktop are not automatically shared. Existing Docker-based projects may also need adjustments depending on their tooling and configuration.

Requirements for WSL Containers

Before getting started, make sure your Windows system meets the following requirements:

  • Windows 11, with a supported WSL 2 configuration.
  • WSL version 2.9.3 or later.
  • Hardware virtualization enabled and the required Windows virtualization components available.
  • An internet connection for downloading container images.

The feature is included with WSL, so there is no separate WSL Containers engine to install.

You can check your current WSL version from PowerShell:

wsl --version

If WSL is not installed, open PowerShell as an administrator and install it with:

wsl --install

Restart Windows if prompted. Once the initial installation is complete, update WSL before continuing.

Step 1: Update WSL to Enable Containers

Open PowerShell or Windows Terminal. Run the following command:

wsl --update

This downloads the latest stable WSL version available through the normal update channel.

Next, restart WSL so that the updated components are loaded:

wsl --shutdown

This command stops running WSL distributions and virtual machines. Save any work running inside Linux terminals before executing it.

Reopen PowerShell and verify the installation:

wsl --version

You can also check whether the container command is available:

wslc version

If the command returns version information, the CLI is available. If Windows reports that wslc is not recognized, confirm that WSL is up to date and that the installed version meets the minimum requirement.

Step 2: Test Your First Linux Container

The simplest way to confirm that WSL Containers is working is to run the hello-world image.

Execute this command in PowerShell:

wslc run --rm hello-world

If the image isn’t already available locally, the tool downloads it and runs the container. You should see a confirmation message explaining that the container ran successfully.

Here’s what the command does:

  • wslc run starts a container.
  • --rm automatically removes the container after it exits.
  • hello-world identifies the image to run.

You have now successfully launched a Linux container on Windows without Docker Desktop.

Step 3: Run an Ubuntu Container

You can also start an Ubuntu container to execute Linux commands.

Run:

wslc run --rm -it ubuntu:latest bash

This downloads the Ubuntu image if necessary and opens an interactive Bash shell inside the container.

Once the shell opens, check the operating system:

cat /etc/os-release

You can run other Linux commands as needed. To leave the container, type:

exit

Because the command includes --rm, the container is automatically removed when it stops.

Important: A container is not the same as a full Ubuntu WSL distribution. Containers are designed to run isolated application workloads, and their lifecycle differs from that of a persistent Linux distribution installed with wsl --install.

Step 4: Run a Web Server on Windows

One of the most useful applications of containers is running a local web server for development or testing.

For this example, we’ll use Nginx.

Start the container in the background:

wslc run -d --rm -p 8080:80 --name web nginx

This command launches Nginx and publishes port 80 inside the container as port 8080 on the Windows host.

The options mean:

  • -d: Run the container in the background.
  • --rm: Remove the container automatically after it stops.
  • -p 8080:80: Map Windows port 8080 to container port 80.
  • --name web: Give the container the name web.
  • nginx: Use the official Nginx container image.

Now open your browser on Windows and navigate to:

http://localhost:8080

You should see the default Nginx welcome page.

You can also test the server from PowerShell:

curl.exe http://localhost:8080

If the server responds with HTML, the container is accessible from Windows.

Step 5: Manage Running Containers

WSL Containers includes commands for viewing and managing your workloads.

List running containers

wslc container list

View container logs

wslc container logs web

Execute a command inside the container

wslc exec web cat /etc/os-release

Stop the web server

wslc container stop web

Since this example uses --rm, the container is removed after it stops.

To see which images are stored locally, run:

wslc image list

You can view available commands and their options with:

wslc --help

For additional details on a particular command, use:

wslc run --help

Step 6: Build Your Own Container Image

WSL Containers can also build images for your own applications.

For example, suppose you have a small application in a project directory and want to package it into a container.

Create a file named Containerfile in the project’s root directory. For a basic Python application, the file could look like this:

FROM python:3
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
EXPOSE 8000
CMD ["python", "app.py"]

This is an illustrative example. Your project must include a compatible requirements.txt and an app.py that starts a web server listening on port 8000.

Open PowerShell in the directory containing the Containerfile and build the image:

wslc build -t my-python-app .

The -t option assigns a name to the resulting image, while the final . tells the tool to use the current directory as the build context.

After the build completes, confirm that the image exists:

wslc image list

Run the application in the background:

wslc run -d --rm -p 8000:8000 --name python-app my-python-app

If the application starts successfully and listens on 0.0.0.0:8000 inside the container, you can access it from Windows at:

http://localhost:8000

For a real application, make sure your container configuration, dependencies, environment variables, and startup command match the project you’re building.

WSL Containers vs. Docker Desktop

Which solution should you choose? It depends on your workflow.

FeatureWSL ContainersDocker Desktop
Separate desktop applicationNot requiredRequired
Command-line container managementYes, using wslcYes, using Docker CLI
Build and run Linux imagesYesYes
Graphical management interfaceNot the main focusYes
Existing Docker image store shared automaticallyNoUses its own configured storage
Integration with Windows applicationsWSL Containers APIDocker APIs and development tooling
Best fitTerminal-focused local developmentWorkflows that benefit from Docker Desktop’s interface and ecosystem

WSL Containers is particularly interesting if you want a simpler, terminal-first setup. Docker Desktop may remain the better choice if you depend on its graphical tools, integrations, or an established Docker Compose workflow.

Before replacing Docker Desktop in a production-like development environment, verify that the features and tooling your project requires are supported.

Troubleshooting WSL Containers

The wslc Command Is Not Recognized

First, check your installed WSL version:

wsl --version

Then update WSL and restart it:

wsl --update
wsl --shutdown

Open a new terminal and try:

wslc version

If the command remains unavailable, consult Microsoft’s official documentation for the latest prerequisites and troubleshooting guidance.

The Container Cannot Be Reached Through Localhost

Check that the container is running:

wslc container list

Review its logs:

wslc container logs web

Confirm that you published the correct ports and that the application listens on the expected port inside the container. For example, -p 8080:80 maps host port 8080 to container port 80.

A Container Fails to Start

Inspect the logs and review the image’s startup configuration. An invalid command, missing environment variable, incompatible image, or unavailable dependency can prevent an application from starting.

You can also consult the relevant command help:

wslc run --help

Docker Desktop Images Are Missing

This is expected. WSL Containers has its own image store and does not automatically import Docker Desktop images.

Pull or build the required images again using wslc, or retain Docker Desktop if your existing workflow depends on its image store and tools.

Conclusion

WSL Containers gives Windows developers another way to work with Linux containers without installing Docker Desktop. Since the feature is now generally available, updating WSL provides access to the built-in wslc command-line interface and the WSL Containers API.

You can use it to run Ubuntu containers, launch web servers, build custom images, and test Linux applications directly from Windows. For developers who prefer a lightweight, terminal-driven workflow, it is a useful addition to the Windows development environment.

Docker Desktop remains a strong option for users who need its graphical interface or established integrations, but WSL Containers makes it easier to get started with local Linux container workloads using the tools already built into WSL.

Official Sources

G
Enjoy Tech2Geek?

Add Tech2Geek as a preferred source on Google to see more of our latest tech articles.

Add Tech2Geek
☕

Support Tech2Geek ❤️

Did this guide help you? If Tech2Geek saves you time or helps you solve a problem, consider buying me a coffee. ☕
Your support helps keep Tech2Geek independent and free.

☕ Buy Me a Coffee
Every coffee makes a difference. Thank you! 🙏

Categorized in: