Created
July 10, 2018 18:31
-
-
Save fiveisprime/eb99f12593ff53949dd31e1495f1b7b8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Base | |
FROM node:8.11.3-alpine AS base | |
WORKDIR /usr/src/app | |
COPY ["package.json", "package-lock.json*", "npm-shrinkwrap.json*", "./"] | |
# Dependencies | |
FROM base AS dependencies | |
RUN npm install --production --silent | |
RUN cp -R node_modules prod_node_modules | |
RUN npm install --silent | |
# Build | |
FROM dependencies AS base | |
COPY . . | |
RUN ./build.js | |
# Release | |
FROM build AS release | |
COPY --from=dependencies /root/chat/prod_node_modules ./node_modules | |
COPY . . | |
ENV NODE_ENV production | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment