Reputation: 7085
I created an app with react.js and node.js but now I need to use Docker, here is my code:
https://github.com/mruanova/members
I created my Dockerfile and followed the instructions from nodejs.org:
https://nodejs.org/en/docs/guides/nodejs-docker-webapp/
The problem is that when i do:
docker ps
I get nothing:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
As suggested by the answers here I tried:
docker ps -a
and I get the ID now but not the PORT:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
123 mruanova/app "node server.js" 7 min ago Exited ? hopeful_williams
987 b7c11ccf6409 "node server.js" 9 min ago Exited ? ecstatic_jennings
Upvotes: 0
Views: 4015
Reputation: 5303
Try this:
docker ps -a
The process may be running under a user account other than your own. The -a
option lists processes from ALL users.
To show the port, first get the CONTAINER id, then:
docker port CONTAINER
Upvotes: 2