It does work fine on localhost:3000/ when I run it locally.
I have tried this on Pop_OS! and on MacOS Sonoma 14.4 (Intel chip)
I have tried this on two separate networks to rule out IT as a problem. DNS is perfect.
There are a lot of different versions that pop up when I type “docker version”, but I’ve tried it on client version 25.03 and 25.04, as well as Docker Desktop 4.27.2 and 4.28.0
docker run -dp 0.0.0.0:3000:3000 fuhrmaaj/getting-started
After it’s done pulling, click on the port 3000 link that pops up.
Despair.
I copy and pasted the content of the Dockerfile into a file called Dockerfile and placed it in the same level as package.json. It does not have a file extension and it does have a Docker icon on it in my VSCode, which seems promising. I’m a little confused as to why there’s a line that says “WORKDIR /app” when there isn’t a /app directory, but it works fine locally so I trust it.
I have removed all images and containers from my local devices. I ran:
docker build -t getting-started . # in the path/to/getting-started-app
docker tag getting-started fuhrmaaj/getting-started
docker push fuhrmaaj/getting-started
I see it on dockerhub, it says the “latest” tag is getting pushed and pulled. I tried changing the IP of the docker run on PWD to 3000:80, and opening both 80 and 3000. I’m super stumped and would love if anybody can see what I’m doing wrong.
Thank you so much for trying this out for me. At least that means that something was done right!
I am able to get it to run locally, but I can’t get it to work on lab.play-with-docker.com. Can you confirm that you were able to get it to run on the PWD?
I wouldn’t run an image I don’t know from someone I don’t know (sorry, I’m that paranoid ), but if the container and its port works locally, then it doesn’t matter what we try on play with Docker, so I tried a simple official HTTPD image. Accessing the port didn’t work for me either. You could click on the “Give a feedback” button and report it, but someone else already did it on GitHub
Hey man, I was thinking about that when I posted it and it totally makes sense that you don’t feel safe running it. It’s a bummer that I can’t click a button on Docker to share the source code with you!
Thank you for trying it out, I’m definitely going to give them some feedback! It’s too bad I’ve spent two days trying to get this to work though =/
I’m not sure what you mean by “button on Docker”, but you could share the source code following this guide: How to format your forum posts
which is the same way as on almost every IT support forum But that’s not the point, I could download the image, and check the content without sharing the code here. I actually did it, but I wouldn’t spend more time on understanding the code, when it is not really neccessary
I hope they fix “Play with Docker” soon, but can you share what you like in PWD that you can’t do locally? Or do you want to share the links or do you want to try Docker CE when you have Docker Desktop locally?
PS.: I’m going to change the topic title to describe the actual problem better.
True, I didn’t think about the risk my image represented until a couple hours after posting so I didn’t think to share the code. But as you said, the problem isn’t really with the code, it seems to be with PWD and knowing that other people are having trouble getting anything to work helps me a lot.
This is my first experience with software containers and with Docker. So I don’t have any like or affinity with PWD, it was just what the Docker docs told me to use in the getting started guide here: Share the application | Docker Docs
I’m happy to run it locally and it seems to work. I just thought that if it wasn’t working on PWD, then maybe there was something I was missing about how to use Docker that would prevent me from deploying anything serious on it. I’ll keep working through the tutorial and thank you so much for the response.
Also, make sure in your Docker.com account that your repositories are Public (click on your repository name, Settings…Visibility Settings…Make Public). You can also click on the gear icon (top right of window) to adjust your Repository Settings to default to Public (and change to Private whenever you need a repository to be hidden from the public). Cheers, Jason