Guest User

Untitled

a guest
Jul 22nd, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. FROM node:8.9-slim AS base
  2.  
  3. RUN npm install yarn -g
  4. RUN mkdir -p /usr/svr
  5.  
  6. WORKDIR /usr/svr
  7.  
  8. # Bundle app source
  9. COPY . /usr/svr
  10.  
  11. EXPOSE 8080 5858 443
  12.  
  13. # Entrypoint
  14. ENTRYPOINT ["/bin/bash", "start.sh"]
  15.  
  16. FROM base AS local
  17. ADD package.json /tmp/package.json
  18. ADD yarn.lock /tmp/yarn.lock
  19. RUN cd /tmp && yarn install --production=false
  20. RUN cp -a /tmp/node_modules /usr/svr
  21.  
  22. FROM base AS production
  23. ADD package.json /tmp/package.json
  24. ADD yarn.lock /tmp/yarn.lock
  25. RUN cd /tmp && yarn install --production=true
  26. RUN cp -a /tmp/node_modules /usr/svr
Add Comment
Please, Sign In to add comment