Dockerfile 372 B

12345678910111213141516171819
  1. # specify the node base image with your desired version node:<version>
  2. FROM node:8
  3. RUN mkdir -p /usr/src/app
  4. WORKDIR /usr/src/app
  5. RUN chown -R node:node /usr/src/app
  6. COPY . .
  7. RUN chown -R node:node /usr/src/app
  8. USER node
  9. RUN yarn install --only=production
  10. RUN yarn run build
  11. # replace this with your application's default port
  12. EXPOSE 3010
  13. CMD ["node", "server.js"]