Using docker image - unable to connect outside localhost

I’m running keycloak in docker. I can access it with http://localhost:8080 and with http://mylocalip:8080 but not from another PC in my subnet. I’m getting matching results from nmap - it works from my PC but not any others. I’ve even disabled my firewall for the few seconds it took to check it from another PC.

Is there an environment variable I need to set?

nmap -p 8080 mylocalip

docker run --rm -p 8080:8080 -e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=??? Quay
Quay = “quay . io/keycloak/keycloak:16.1.0” without the spaces.

Thanks,

It doesn’t look like a Keycloak problem. It looks like your networking problem (firewalls, docker networking, wifi isolation,…).

Thanks for your prompt response. I woke up realizing that it must be docker. It looks like docker needs a NAT or something from the local network.

Only you know how is your network/docker configured. Blind guess: start Keycloak container directly in the host network - that can be “lazy” (= with minimal effort) solution: Use host networking | Docker Documentation