How to configure Docker Desktop to work through WSL2 with Hyper-V disabled?
System: Microsoft Windows 10 Pro (10.0.19045)
- Virtualization enabled: Yes
- Virtualization extensions enabled: Yes
- Second Level Address Translation: Yes
- Data Execution Prevention: Yes
WSL2 is working correctly:
- WSL version: 2.6.1.0
- Kernel version: 6.6.87.2-1
- WSLg version: 1.0.66
- MSRDC version: 1.2.6353
- Direct3D version: 1.611.1-81528511
- DXCore version: 10.0.26100.1-240331-1435.ge-release
- Windows version: 10.0.19045.3086
- Ubuntu 24.04 LTS
Problem: Docker Desktop is not installed or not working.
Constraint: Hyper-V is disabled to run Android emulators (BlueStack, NOX).
Question: How to make Docker Desktop work exclusively through WSL2 without enabling Hyper-V?
Unfortunately, it is impossible to completely disable Hyper-V and force Docker Desktop to work exclusively through WSL2, since WSL2 itself requires Hyper-V components to function. Even when configuring Docker Desktop to use WSL2, the system will still use the underlying Hyper-V virtualization components, which may conflict with your Android emulators.
Contents
- Technical Limitation of WSL2 and Hyper-V
- Why WSL2 Cannot Work Without Hyper-V
- Alternative Solutions for Docker
- Configuring Docker Desktop with Minimal Hyper-V
- Verifying Docker Desktop Configuration
- Conclusion and Recommendations
Technical Limitation of WSL2 and Hyper-V
Research shows that WSL2 is architecturally dependent on Hyper-V. Even when attempting to run Docker Desktop exclusively through WSL2, the system will use the basic Hyper-V virtualization components. This is a fundamental architectural limitation of Windows.
According to sources: “WSL2 in turn also uses Hyper-V — so without having Hyper-V enabled Docker Desktop fails to start and can’t be used” [1]. This means that any attempts to completely disable Hyper-V will result in both WSL2 and Docker Desktop becoming non-functional.
Why WSL2 Cannot Work Without Hyper-V
WSL2 operates through a full Linux kernel running in a virtual machine. This virtual machine requires:
- Hyper-V hypervisor to create the virtual environment
- Virtual Machine Platform
- Windows Hypervisor Platform components
Research shows: “There is no way to use Docker Desktop to run Linux containers on Windows without Hyper-V. It needs to either run a Linux VM itself (the default setup IIRC), or have a WSL2 environment it can work with (which in turn requires Hyper-V)” [2].
This limitation persists even in newer Windows 10 builds: “You should be able to run wsl2 without hyper-v, but it requires a newer windows build” [10], but even this doesn’t guarantee full compatibility with Docker Desktop.
Alternative Solutions for Docker
Since completely disabling Hyper-V is impossible, let’s consider several alternatives:
1. Using Docker CLI without Docker Desktop
# Install Docker CLI only
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
# Start Docker through WSL2 without GUI
sudo dockerd
2. Docker on a remote server
- Set up a remote Docker daemon on a dedicated server
- Use Docker CLI to connect to the remote server
- This completely eliminates conflicts with Hyper-V on your local PC
3. Virtual machine with Docker
- Create a virtual machine in VirtualBox (doesn’t use Hyper-V)
- Install Docker in this virtual machine
- Configure port forwarding to access Docker containers
Important: When using alternative solutions, be aware that you will lose the convenience of Docker Desktop’s integration with Windows and some features, such as Docker Compose, Docker Machine, and the graphical interface.
Configuring Docker Desktop with Minimal Hyper-V
If you still want to use Docker Desktop, try to minimize conflicts with Android emulators:
-
Enable only necessary Hyper-V components:
- Virtual Machine Platform
- Windows Hypervisor Platform
- Disable unnecessary Hyper-V services
-
Configure virtualization priority:
powershell# Set high priority for WSL2 bcdedit /set hypervisorlaunchtype auto -
Docker Desktop configuration:
- Open Docker Desktop settings
- Go to “General”
- Check “Use the WSL 2 based engine”
- Disable all options related to Hyper-V
Check: “DockerD runs directly within WSL so there’s no need for the Hyper-V VM and all Linux containers run within the Linux userspace on Windows” [6].
Verifying Docker Desktop Configuration
After installing Docker Desktop, perform verification:
# Check Docker version
docker --version
# Check Docker information
docker info
# Check if WSL2 is being used
wsl -l -v
If Docker Desktop is properly configured to work with WSL2, you will see messages indicating that Docker is running through WSL2 rather than through a full Hyper-V virtual machine.
However, remember: “Docker desktop still using Hyper-V in Windows 10 even though it’s configured to use WSL 2” [9]. This confirms that even when configured for WSL2, the basic Hyper-V components are still being used.
Conclusion and Recommendations
Main conclusions regarding your question:
-
Fundamental limitation: WSL2 architecturally requires Hyper-V, so completely disabling it without losing functionality is impossible
-
Conflict with Android emulators: Since your BlueStack and NOX applications require Hyper-V to be disabled, using Docker Desktop in standard configuration will be problematic
-
Practical solutions:
- Use Docker CLI without graphical interface
- Set up a remote Docker server
- Work with Docker in a VirtualBox virtual machine
- Try minimal Hyper-V configuration with priority for WSL2
-
Recommendation: If Android emulators are critically important for your work, consider using Docker on a separate device or in a cloud environment to avoid virtualization conflicts on a single computer.
Sources
- Medium - Docker Desktop Installation with wsl2 for Windows Home
- Super User - How to use container in WSL 2, without installing the Hyper-v feature?
- Code Visual Studio - Using Docker in WSL 2
- Docker Forums - Question about Docker Desktop, Windows and Hyper-V (Without WSL)
- Reddit - Docker for Windows without HyperV and WSL best option?
- Super User - Docker on Hyper-V vs WSL 2
- Medium - Docker on WSL 2
- Code with Mosh Forum - Docker - Hyper-V instead of WSL 2?
- Docker Forums - Docker Desktop still using Hyper-V in Windows 10 even though it’s configured to use WSL 2
- Stack Overflow - Force docker for Windows to use Hyper-V instead of WSL2