1
0
mirror of https://git.sr.ht/~cadence/bibliogram synced 2024-11-22 08:07:30 +00:00

Multistage build for smaller image

This commit is contained in:
tympom 2020-06-24 12:09:00 +02:00 committed by GitHub
parent 20ea14c0d1
commit 54f617b5ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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"]