Merge pull request #90 from tympom/patch-1

Multistage build for smaller image
This commit is contained in:
Cadence Ember 2020-06-25 01:01:54 +12:00 committed by GitHub
commit 865e3b0778
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -1,7 +1,11 @@
FROM node:12.18.1-alpine
FROM node:12.18.1-alpine as build
RUN apk --no-cache add git python3 make g++
WORKDIR /app
COPY . .
RUN npm install --no-optional
FROM node:12.18.1-alpine as app
WORKDIR /app
COPY --from=build /app /app
EXPOSE 10407
CMD ["npm", "start"]