I have Ubuntu 20.04, Mozilla Firefox 87.0, Google Chrome 89.0.4389.90.
I am trying to run the Docker Getting-started tutorial. I read a couple of posts from stack overflow to not avail. Also I checked this ToDo App (localhost:3000) shows no UI in Browser #9 and this enter link description here again to not avail. I do,
sudo docker build -t getting-started .
sudo docker run -dp 3000:3000 getting-started
and then when I go to http://localhost:3000 I get,
In Firefox,

in Chrome the following images alternate,

When I run, sudo docker ps -a I get,

Finally, do you suggest any Docker tutorial for beginners? I want to have enough understanding for Docker so that I can write scripts to manage docker images.
You might be building and running the Dockerfile outside the "app" directory which has this behaviour. As the tutorial says, first go to the app directory, create a Dockerfile there and then build and run. This should work.
3000:80 opens the tutorial because the default Dockerfile builds the docker/getting-started which is the tutorial.
Might be the problem something is blocking the port on your machine so try to Replace the port to 80 instead of 3000. Change from
docker run -dp 3000:3000 getting-started
to
docker run -dp 3000:80 getting-started
and then open browser and hit http://localhost:3000
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With