The landscape of Linux containers on Windows has taken a notable turn. From now on, WSL Containers is accessible to everyone, offering a native alternative to Docker Desktop. Microsoft presents this advancement as a significant evolution for developers and system administrators intrigued by containerization without external dependencies.
Historically, Windows used WSL to provide a Linux subsystem, but container management often relied on Docker Desktop, which itself depended on a WSL 2 layer. This dependency sometimes created complexities and constraints around licenses or resource consumption.
With WSL Containers, Microsoft has directly integrated Linux container management at the core of the system. The solution relies on wslc.exe, a native command that significantly simplifies the creation, execution, and control of containers. This new feature removes the need to open a specific Linux distribution or install Docker for common use cases.
How WSL Containers changes the game for developers on Windows
It’s not every day that an OS draws so deeply from the Linux ecosystem to improve its offering. Rather than imposing a third-party tool, WSL Containers provides a lightweight and integrated alternative. For example, the wslc.exe command allows for easy management of volumes, networks, and processes without heavy mediation.
This approach is somewhat like refreshing an old engine by installing cutting-edge electronic fuel injection: the parts are there, but everything becomes much smoother. Developers gain responsiveness and direct control. Whether for testing a microservice or deploying a development environment, the experience is simpler.
Another commendable point: it is now possible to integrate the tool with editors like Visual Studio Code. Microsoft’s Containers extension already recognizes WSL Containers, making it easier to manage Dev Containers without leaving the IDE.
Main features and current limitations of WSL Containers
Since its preview version, the tool has been enriched with a plethora of features. It manages container restarts, allows file copying, and provides an event stream to monitor their activity.
Data storage is also modifiable, allowing the choice of location, a detail that appeals to those who like to have control over their system like on a classic Linux server. This is proof that Microsoft is not doing things haphazardly.
However, WSL Containers is not yet a complete replacement for Docker Desktop for all scenarios. The current lack of support for Docker Compose is notable. Microsoft promises to rectify this quickly, with clear goals to make existing compose.yaml files compatible without new syntax.
Integration and ecosystem around WSL Containers
Developers using open-source tools will find a solid ally here. WSL Containers makes running Linux containers on Windows 11 so natural that one might almost forget they are working outside a native Linux system.
Several third-party tools are already beginning to support this new offering, creating a virtuous cycle. Using VS Code as an administration environment or integrating with cloud development platforms are concrete examples.
In summary, this evolution reflects Microsoft’s desire to increasingly embed itself in the world of open source, without excessive lock-in.
Pragmatic comparison between Docker Desktop and WSL Containers
Docker Desktop remains robust for complex projects, especially for those relying on powerful orchestrators or multi-project stacks. WSL Containers is lighter, more integrated, but still improvable in certain cases.
It’s a bit like having two utensils on a table: one is a Swiss army knife, while the other is a specialized but effective tool. The use will therefore depend on actual needs and preferences regarding tools.
System administrators who prefer to limit external dependencies will appreciate this native and sober approach.
What is WSL Containers?
WSL Containers is a feature of Windows Subsystem for Linux that allows executing and managing Linux containers directly on Windows, without the need for Docker Desktop.
Can Docker Compose be used with WSL Containers?
Currently, Docker Compose is not yet natively supported. Microsoft plans to add this compatibility soon to facilitate the management of multiple containers.
How does WSL Containers differ from Docker Desktop?
WSL Containers offers native integration with Windows via wslc.exe, reducing dependencies. Docker Desktop remains more comprehensive for complex architectures and multi-project endeavors.
Which editors support WSL Containers?
Visual Studio Code is already compatible with this technology, notably thanks to its Containers extension, which allows managing containers directly from the editor.
Do you need a Linux distribution installed to use WSL Containers?
No, WSL Containers functions independently of opening a specific Linux distribution. Everything is commanded through the integrated wslc.exe tool.
For those who wish to delve deeper, the official documentation provides the essential technical details. The article on the controversy surrounding WSL 3 clearly outlines the stakes of development. Finally, this comprehensive file explains the ins and outs of native containerization on Windows.
Source: www.clubic.com