-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (27 loc) · 1.02 KB
/
Dockerfile
File metadata and controls
38 lines (27 loc) · 1.02 KB
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
# syntax=docker/dockerfile:1
FROM node:25.2-alpine3.23 AS builder
WORKDIR /app
# copy the source and build files of all modules into the workdir
COPY ./src /app/src
COPY ./package.json ./package-lock.json ./tsconfig.json /app/
# install python and build tools for node-gyp
RUN apk add --no-cache python3 make g++
# install and build all modules
RUN npm ci && npm run build
FROM node:25.2-alpine3.23 AS analyzer-sample
LABEL author="Florian Sihler" git="https://github.com/flowr-analysis/sample-analyzer-project-query"
WORKDIR /app
# copy all package.jsons so we can install them (see below)
COPY ./package.json ./package-lock.json /app/
COPY --from=builder /app/dist /app
# make new user and clean up the test files
RUN rm -rf /app/**/tsconfig.tsbuildinfo /app/**/*.d.ts /app/test/* && addgroup -S flowr && adduser -S flowr -G flowr
USER flowr
# we also configure basic memory options
ENTRYPOINT [\
"node",\
"--max-old-space-size=8192",\
"--stack-size=8192",\
"--max-semi-space-size=8192",\
"/app/main.min.js"\
]