forked from mei23/misskey
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
37 lines (25 loc) · 803 Bytes
/
Dockerfile
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
FROM node:20.12.2-bookworm AS builder
ENV NODE_ENV=production
ENV COREPACK_DEFAULT_TO_LATEST=0
WORKDIR /misskey
RUN apt-get update \
&& apt-get install -y --no-install-recommends build-essential
COPY package.json pnpm-lock.yaml ./
RUN corepack enable pnpm
RUN pnpm i --frozen-lockfile
COPY . ./
RUN pnpm build
FROM node:20.12.2-bookworm-slim AS runner
ENV COREPACK_DEFAULT_TO_LATEST=0
WORKDIR /misskey
RUN apt-get update \
&& apt-get install -y --no-install-recommends ffmpeg mecab mecab-ipadic-utf8 tini curl wget\
&& apt-get -y clean \
&& rm -rf /var/lib/apt/lists/* \
&& corepack enable pnpm
COPY --from=builder /misskey/node_modules ./node_modules
COPY --from=builder /misskey/built ./built
COPY . ./
ENV NODE_ENV=production
ENTRYPOINT ["/usr/bin/tini", "--"]
CMD ["pnpm", "start"]