I am using this Dockerfile to create an image and start a container:
FROM node:6.1.0-wheezy
RUN mkdir /usr/src/goof
COPY . /usr/src/goof
WORKDIR /usr/src/goof
RUN npm install
EXPOSE 3112
EXPOSE 31337
CMD ["npm", "start"]
So the image was created and also the container started but when I try to access it using localhost:3112
is not working.
Does anybody know what could be the problem ?
and this is the command how I start the container docker run --rm -p 3112:3112 --name rce rce
CodePudding user response:
As you mention in the comments it looks that you expose the wrong port for your node app
so all you need is to expose port 3113
for your app and when you run your container
will be something like this
docker run --rm -p 3113:3113 -p 3112:3112 --name rce rce