Cannot connect to my docker containers


I have a few containers that I start with: docker run -p 8080:8080 -t [containername]

I need to then access the container via for example. This was working a few weeks back but suddenly it’s not working anymore… I just get a blank white page on my browser. This has occurred with the mutillidae and WebGoat containers. I do a docker ps and get but obviously that’s not the correct IP. I also do docker inspect on the containers and I do see IPs under here but these do not work at all (Page not found) when used with the 8080 port. I did some Googling and it seems there may be some VM middleman on macOS which doesn’t expose those IPs to the operating system but I’m not sure what the problem is here. I haven’t updated Docker or the OS . Any advice? Thanks.

Note: I also tried http://localhost:8080 as well as other ports. Also, I’m using plain docker installed by brew install, not the GUI or anything else.


Are you not having conflicts with another container using the same port 8080?
Did you tried to start another container using another port like:

docker run -p 8081:8080 -t [containername]