I am new to Docker , so I may not be able to frame my question correctly.
I have created an image for my node js application by using below command.
docker build -t ramakishore/nodeapp .
I have created a container for this image by executing below command
docker run -p 49160:8080 -d ramakishore/nodeapp
docker ps command displays
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ca64b61afca7 ramakishore/nodeapp "npm start" 6 minutes ago Up 6 minutes 0.0.0.0:49160->8080/tcp gigantic_swanson
Contents of my dockerFile are
FROM node:boron
# Create app directory
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
# Install app dependencies
COPY package.json /usr/src/app/
RUN npm install
# Bundle app source
COPY . /usr/src/app
EXPOSE 8080
CMD [ "npm", "start" ]
When I type http://localhost:8080 in chrome , I was expecting my node page to be displayed, but instead "This site can’t be reached" is displayed.
Any idea what is the mistake I doing.