Docker container won't display tutorial app: Safari can't open the page "localhost:3000" because Safari can't connect to the server "localhost"

macOS Version/build: Sequoia 15.5
Docker app version: 4.42.1
Steps:
Going through the learning center module named, “How do I run a container?” noted by the screenshot below.

However when I get to step 6 when it’s time to actually view the frontend, and click on the 8089:3000 link I get the safari can’t connect to localhost:3000 because safari can’t connect to server localhost.

Any pointers on how to get the webpage running off of the container to display properly on Safari?

Is it a setting I have to configure in Safari? Is this a network issue? Not entirely sure how to go about solving this.

Hello and welcome,

in the beginning it might be a “little” confusing:
The message stating that it is accepting connections to localhost:3000


is from within the container - your service IS running.
The service running inside the container is listening in tcp-port :3000.
But the container’s localhost is NOT your computer’s localhost.
Therefore you mapped your computer’s tcp-port :8089 to the container’s tcp-port:3000 (with entering the 8089 in step 5 of the mentioned tutorial).
Accessing http://localhost:8089 within your browser should work (at least it is working for me :slight_smile: ) because docker is forwarding this request to the container’s tcp-port :3000.

Best regards
Matthias

If that link takes you to port 3000, that looks like a bug. Normally the port on the left side is the host port and the port on the right side is the container port. Your screenshot shows the right URL, but if it really takes you to the wrong one, that is a bug. Is this the case? Or you clicked on the link suggested by @matthiasradde ?