Matthew
Matthew

Reputation: 105

Docker Container is unreachable outside localhost

I'm running my mobile application backend server inside of a docker container (using Docker Desktop 2.4.0.0 for Windows). Suddenly my backend is unreachable outside localhost, so I can't test it from my phone physically. Works like a charm from the host, it even works if I try to reach it via local IP from the host, but if I use the same IP on my network, it's un-reachable. As far as I can tell, the only change that I made to my environment is accidentally updating Docker. Any help is appreciated. Kind regards. Btw, when I run docker ps to check if the ports are forwarded correctly, the container that I want to reach is bound to 0.0.0.0.

version: "3"
services:
  db:
    image: mysql:8.0.20
    container_name: db
    ports:
      - "3306:3306"
  web:
    image: tomcat:9.0.35
    container_name: web_app
    environment:
      JAVA_OPTS: -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:8000
    ports:
      - "8888:8080"
      - "8000:8000"

Upvotes: 0

Views: 1490

Answers (1)

BMitch
BMitch

Reputation: 263956

Check the Windows Firewall settings. One of the updates may have started obeying those settings instead of bypassing them. There was a recent report of WSL2 bypassing the firewall, so if you are using that and updated this patch Tuesday, that's a likely cause.

Upvotes: 3

Related Questions