Create a Dockerfile:
FROM node:latest MAINTAINER Zhentian Wan ENV NODE_ENV=production
ENV PORT= COPY . /var/www WORKDIR /var/www RUN npm install EXPOSE $PORT ENTRYPOINT ["npm", "start"]
Build Dockerfile:
docker build -t zhentian/node .
Run image:
docker run -d -p : zhentian/node