-
Notifications
You must be signed in to change notification settings - Fork 41
Expand file tree
/
Copy pathDockerfile
More file actions
25 lines (17 loc) · 986 Bytes
/
Dockerfile
File metadata and controls
25 lines (17 loc) · 986 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
FROM node:24-alpine AS builder
RUN apk add --no-cache python3 make g++
WORKDIR /usr/insights/app
RUN npm install -g corepack@latest && corepack enable pnpm && corepack prepare pnpm@10.12.4 --activate
COPY ./package.json ./pnpm-workspace.yaml ./pnpm-lock.yaml ./
COPY ./patches ./patches
RUN pnpm fetch --ignore-scripts
COPY ./submodules ./submodules
COPY ./workers/temporal/base ./workers/temporal/base
COPY ./workers/temporal/package_downloads_worker ./workers/temporal/package_downloads_worker
RUN pnpm i --frozen-lockfile
FROM node:20-bookworm-slim AS runner
WORKDIR /usr/insights/app
RUN npm install -g corepack@latest && corepack enable pnpm && corepack prepare pnpm@10.12.4 --activate && apt update && apt install -y ca-certificates --no-install-recommends && rm -rf /var/lib/apt/lists/*
COPY --from=builder /usr/insights/app/node_modules ./node_modules
COPY --from=builder /usr/insights/app/submodules ./submodules
COPY --from=builder /usr/insights/app/workers ./workers