I'm trying to expose port for node.js image but it's dosen't expose the port outside :
FROM node:4-onbuild
ADD package.json /tmp/package.json
RUN cd /tmp && npm install
RUN mkdir -p /opt/app && cp -a /tmp/node_modules /opt/app/
WORKDIR /opt/app
ADD . /opt/app
EXPOSE 8000:8000
CMD ["npm", "start"]
only when publishing the port when runing the image it's works
docker run -p=8000:8000
via Daniel Taub
No comments:
Post a Comment