We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2973d59 commit 57e9002Copy full SHA for 57e9002
Dockerfile
@@ -1,13 +1,25 @@
1
-FROM node:18-bullseye-slim
2
-RUN apt-get update -y && apt-get install tini util-linux curl -y
+FROM node:18-bullseye-slim AS builder
+RUN apt-get update -y && apt-get install util-linux curl git -y
3
4
ENV NODE_ENV production
5
6
-COPY . /app
+ADD package.json package-lock.json /app/
7
WORKDIR /app
8
RUN npm ci --include=dev
9
+COPY . /app
10
RUN npm run build
11
12
+FROM node:18-bullseye-slim
13
+RUN apt-get update -y && apt-get install tini util-linux curl -y
14
+
15
+ENV NODE_ENV production
16
17
18
+WORKDIR /app
19
+RUN npm ci
20
21
+COPY --from=builder /app/dist /app/data /app/
22
23
ENV PORT=80
24
EXPOSE 80
25
ENTRYPOINT ["/usr/bin/tini", "--"]
0 commit comments