docker getting started: no name on repository and tag. also the site is inaccessible

I’m trying to learn docker but I’m having troubles with the steps provided. specifically on this part https://docs.docker.com/get-started/part2/

I ran this code as instructed

docker build --tag=friendlyhello .

But when I ran docker image ls, what is shown to me is different from what is expected. The output on machine does not have a repository and tag. says none.

I disregarded and proceed with the tutorial. I tried to run the app with

docker run -p 4000:80 9d8eddd76811

for this one, since I don’t have the repository name I used the image. But this did not provided any feedback.

when I tried to access the site, it’s not available.

There’s a section for troubleshooting linux for changing the DNS settings. I did that but still does the same. I’m just working at home so I did not do the proxy server setting steps.

I tried to rebuild the container and restart the service but I still get the same result.

Is there anything I can use to make the console logs more verbose? Or any other step I can use to test why it is not working?

Source: StackOverflow