Docker for Mac creates a virtual machine for your containers to run on in the background. The Mac itself can see the port on Localhost and if your Mac has the firewall turned off you can browse to your Mac’s IP and port number just fine. I just verified here Turn on Mac firewall it fails to display NGINX default page turn the firewall off and it works from another pc on the same network. you may be able to set the firewall to allow docker to have incoming connections but I would not guarantee that will work. I have no more time to play right now LOL