Last active
October 3, 2018 07:31
-
-
Save vahanNasibyan/c8539ec16d34968e9e2f0a32b4de28f9 to your computer and use it in GitHub Desktop.
This file contains 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
# Stage-1 dependencies | |
FROM node:8.12.0-alpine as pre | |
RUN apk add --no-cache git | |
RUN apk add --no-cache --virtual .build-deps alpine-sdk python \ | |
&& npm install --production --silent \ | |
&& apk del .build-deps | |
USER node | |
WORKDIR /usr/src/app | |
COPY package.json package.json | |
COPY . . | |
# Stage-2 final image | |
FROM node:8.12.0-alpine as production | |
USER node | |
WORKDIR /usr/src/app | |
COPY --from=pre /usr/src/app ./ | |
CMD ["node","app.js"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment