-
-
Notifications
You must be signed in to change notification settings - Fork 25
/
Dockerfile
27 lines (23 loc) · 808 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# syntax=docker/dockerfile:1
ARG NODE_VERSION=lts
FROM node:${NODE_VERSION}-alpine AS base
RUN apk --update --no-cache add \
git openjdk11-jre python3 ffmpeg build-base \
jpeg-dev cairo-dev giflib-dev pango-dev
WORKDIR /usr/src/app
EXPOSE 3000 4000 9000
FROM base AS serve
RUN npm install --global firebase-tools
RUN --mount=type=bind,source=package.json,target=package.json \
--mount=type=bind,source=package-lock.json,target=package-lock.json \
--mount=type=cache,target=/root/.npm \
npm ci --include=dev
COPY . .
CMD npm run serve
FROM base AS production
RUN --mount=type=bind,source=package.json,target=package.json \
--mount=type=bind,source=package-lock.json,target=package-lock.json \
--mount=type=cache,target=/root/.npm \
npm ci --omit=dev
COPY . .
CMD npm start