-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile
More file actions
47 lines (29 loc) · 830 Bytes
/
Dockerfile
File metadata and controls
47 lines (29 loc) · 830 Bytes
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# syntax=docker/dockerfile:1
#NOTE: when using alpine it seems building on arm via github actions hangs forever
# and we need node-gyp and other stuff. so the slim also doesnt work.
#### builder
FROM --platform=linux/amd64 node:23 AS builder
WORKDIR /app
COPY ["package.json", "package-lock.json*", "./"]
#will later be pruned
RUN npm install
COPY . .
RUN npm run build
RUN npm prune --production
### final stage multiarch
FROM node:23 AS ledder
ENV NODE_ENV=production
RUN apt update && apt install -y build-essential cmake \
libcairo2-dev \
libpango1.0-dev \
libjpeg-dev \
libgif-dev \
librsvg2-dev \
pkg-config
COPY entrypoint.sh /
WORKDIR /app
COPY --from=builder /app /app
#rebuilds stuff for specific arch if needed
RUN npm rebuild --verbose
STOPSIGNAL SIGKILL
ENTRYPOINT [ "/entrypoint.sh" ]