run "docker run -p 3000:3000 docker_nodejs_app" instead of "docker run -it docker_nodejs_app"
solve my problem. :)
also, "EXPOSE 3000:3000" in Dockerfile - didnt work, and should be just: "EXPOSE 3000"
Hi, thanks for this tutorial. It's really clear and helpful.
I encountered an error when I tried to run the docker image
Node\docker_nodejs_app>docker run -it docker_nodejs_app
npm ERR! missing script: start
I googled and found that the package.json needs to add this to "scripts" section:
"start": "node app.js"
then rebuilding the docker image file and running it solves the error.
Ofir Aghai
run "docker run -it docker_nodejs_app" in terminal, but when going to localhost from the browser, i got the error: "This site can't be reached"
help?