Hello,
Docker beginner here
Used following dockerfile to create the image.
Dockerfile:
From node:latest
ENV MONGO_INITDB_ROOT_USERNAME=admin
MONGO_DB_PWD=password
RUN mkdir -p /home/app
COPY ./app /home/app
set default dir so that next commands executes in /home/app dir
WORKDIR /home/app
RUN npm install
CMD [“node”,“server.js”]
============================================
Once the container is created and run it i get this message
$ docker run da8bd411d2d1
(node:1) Warning: Accessing non-existent property ‘count’ of module exports inside circular dependency
(Use node --trace-warnings ...
to show where the warning was created)
(node:1) Warning: Accessing non-existent property ‘findOne’ of module exports inside circular dependency
(node:1) Warning: Accessing non-existent property ‘remove’ of module exports inside circular dependency
(node:1) Warning: Accessing non-existent property ‘updateOne’ of module exports inside circular dependency
app listening on port 3000!
But when i try to access this webpage using localhost:3000 it says this page cannot be reached.
This site can’t be reached
localhost refused to connect.
Try:
- Checking the connection
- Checking the proxy and the firewall
ERR_CONNECTION_REFUSED
Not sure what I am doing wrong. Please advise.