Can’t Access Docker Container on WSL2: Browser Issues

0
0
Asked By SunnyDaze92 On

I'm running Windows 11 with WSL2 and Docker Desktop, and suddenly I've lost the ability to access any of my Docker containers through my web browser. I've tried exposing ports properly; for example, I used the `nginx` image like this: `docker run -d -p 8888:80 nginx`. The container seems to be running fine, as it's showing up in my Docker logs. However, when I try to access it in my browser, it doesn't load and I get no error messages. I'm looking for help to figure out why this might be happening and how to fix it!

1 Answer

Answered By TechWhiz101 On

It sounds like your issue may be related to WSL being out of date. I'd recommend updating WSL as a first step. Also, can you post the output of `wsl --version`, `docker version`, and `docker compose version`?

CuriousCoder88 -

Yes, I ran those commands and here's what I got for `wsl --version`: WSL version: 2.4.11.0, so it seems like my WSL is pretty current!

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.