
Linking Jenkins and Docker on Windows with WSL – The Simple Way
Jun 03, 2025 2 Min Read 350 Views
(Last Updated)
If you’re like me, running Jenkins on Windows while using Docker via WSL, you might have hit that frustrating wall where Jenkins just won’t detect Docker. I ran into this exact issue, and after trying out a few setups, I found a simple and effective solution. Here’s how you can get Jenkins and Docker talking happily on a Windows machine with WSL.
Table of contents
- The Setup
- The Problem
- The Fix (Step-by-Step)
- Tip
- Getting Started with Guvi
- Conclusion
The Setup
- Host OS: Windows (tested on Windows 10/11)
- WSL: Windows Subsystem for Linux (Ubuntu in my case)
- Docker: Installed inside WSL
- Jenkins: Installed natively on Windows
The Problem
Jenkins couldn’t recognize Docker even though Docker was working fine inside WSL. The issue? Jenkins (running on Windows) can’t access Docker when it’s only running inside WSL.

The Fix (Step-by-Step)
Here’s the fix that worked for me:
- Install Docker Desktop on Windows
First, install Docker Desktop for Windows. This is key because it provides the Docker daemon that both Windows and WSL can access. - Start Docker Desktop
After installation, launch Docker Desktop and make sure the Docker daemon is running. This bridges Docker across Windows and WSL.
Install Docker in WSL
Open your WSL terminal and install Docker:sudo apt update
sudo apt install docker.io
Once installed, you can test it by running:docker --version
- Open Jenkins
Now, start Jenkins on Windows. Make sure it’s running as a service or from the .war file—whatever you’re using. - Install Docker Plugins in Jenkins
Head to Manage Jenkins → Manage Plugins and install the following:
- Docker
- Docker Pipeline
- Docker Commons
- Docker
- Verify the Connection
In Jenkins, go to Manage Jenkins → Configure System, and add a new Docker cloud configuration using the Unix socket (if you’re bridging) or TCP (depending on how Docker Desktop is set up).
Tip
You might need to add your WSL user to the docker group to run Docker without sudo:
sudo usermod -aG docker $USER
Then restart your terminal or WSL session.
Getting Started with Guvi
Once you link Jenkins and Docker on Windows with WSL, start boosting your Jenkins knowledge to perform advanced automation tasks. Enroll in Guvi’s course on Jenkins, this provides a detailed guide towards CI/CD automation using Jenkins and DevOps. It covers concepts from beginner to advanced level along with professional certification.
Conclusion
With Docker Desktop acting as the bridge, Jenkins and Docker can now play nicely—even if they’re on different parts of your system. This setup gives you the best of both worlds: a native Windows Jenkins setup and the flexibility of Docker in WSL.
Got stuck somewhere? Drop your error or setup in the comments—I’ll try to help!
Did you enjoy this article?