WSL and Docker Desktop

Posted on Monday, March 2, 2026


 


I have been setting up Ubuntu in WSL on windows and I want to set up docker on it.  I could set it up within Ubuntu itself but I have found a few folks suggest installing Docker Desktop and getting it connected to the WSL.

So let’s try it. 

Head over to https://www.docker.com/products/docker-desktop/


 

And click on Download Docker Desktop

 


Download for Windows (in my case AMD64 works)

 


Make sure WSL 2 is checked and press OK.

 

 


Let it install.




Open Docker Desktop

 



Accept, login, etc.

 

 


Click Config

 

 


Click on General and makes sure WSL 2 based engine is selected.

 

 

 


Open Resources à WSL Integration

Here you should see your WSL.  In my case I see Ubuntu-24.04

 

 


Turn it on and click Apply & Restart

Now from your WSL Ubuntu test it

 

> docker version
> docker --version

 

 


 


Let me start up a nagios as a test



> docker run -d \
  --name nagios \
  -e NAGIOSADMIN_USER="user" \
  -e NAGIOSADMIN_PASS="password" \
  -p 8080:80 \
  --restart unless-stopped \
  manios/nagios:latest

 

 

Let me open http://localhost:8080/nagios
from my desktop


 

Username and password are user and password



Hey its working 😊


Now let me kill the container, run this.

 

> docker stop nagios
> docker rm -f nagios

 

 




References

 

No comments:

Post a Comment