Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FROM node:8.9-slim AS base
- RUN npm install yarn -g
- RUN mkdir -p /usr/svr
- WORKDIR /usr/svr
- # Bundle app source
- COPY . /usr/svr
- EXPOSE 8080 5858 443
- # Entrypoint
- ENTRYPOINT ["/bin/bash", "start.sh"]
- FROM base AS local
- ADD package.json /tmp/package.json
- ADD yarn.lock /tmp/yarn.lock
- RUN cd /tmp && yarn install --production=false
- RUN cp -a /tmp/node_modules /usr/svr
- FROM base AS production
- ADD package.json /tmp/package.json
- ADD yarn.lock /tmp/yarn.lock
- RUN cd /tmp && yarn install --production=true
- RUN cp -a /tmp/node_modules /usr/svr
Add Comment
Please, Sign In to add comment