-
-
Notifications
You must be signed in to change notification settings - Fork 136
Expand file tree
/
Copy pathdockerfile
More file actions
31 lines (23 loc) · 691 Bytes
/
dockerfile
File metadata and controls
31 lines (23 loc) · 691 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
FROM node:22-alpine AS builder
ENV MONGOMS_DISABLE_POSTINSTALL=1
ENV REDISMS_DISABLE_POSTINSTALL=1
WORKDIR /app
COPY . .
RUN apk add git make g++ alpine-sdk python3 py3-pip unzip
RUN corepack enable
RUN corepack prepare --activate
RUN pnpm install
RUN pnpm bundle
RUN mv apps/core/out ./out
RUN node apps/core/download-latest-admin-assets.js
FROM node:22-alpine AS runner
RUN apk add zip unzip mongodb-tools bash fish rsync jq curl openrc --no-cache
WORKDIR /app
COPY --from=builder /app/out .
COPY --from=builder /app/assets ./assets
RUN npm i sharp -g
RUN npm i sharp
COPY --chmod=755 docker-entrypoint.sh .
ENV TZ=Asia/Shanghai
EXPOSE 2333
ENTRYPOINT [ "./docker-entrypoint.sh" ]