forked from misskey-dev/misskey
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
46 lines (36 loc) · 868 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
38
39
40
41
42
43
44
45
46
FROM node:16.0.0-alpine3.13 AS base
ENV NODE_ENV=production
ARG VERSION_SUFFIX
WORKDIR /misskey
FROM base AS builder
RUN apk add --no-cache \
autoconf \
automake \
file \
g++ \
gcc \
libc-dev \
libtool \
make \
nasm \
pkgconfig \
python3 \
zlib-dev \
vips-dev \
vips
COPY package.json yarn.lock .yarnrc ./
RUN yarn install
COPY . ./
RUN sed -i'' -E 's/'$'\t''"version": "(.*)",/'$'\t''"version": "\1'"$VERSION_SUFFIX"'",/' package.json
RUN yarn build
FROM base AS runner
RUN apk add --no-cache \
ffmpeg \
tini \
vips
ENTRYPOINT ["/sbin/tini", "--"]
COPY --from=builder /misskey/node_modules ./node_modules
COPY --from=builder /misskey/built ./built
COPY . ./
RUN sed -i'' -E 's/'$'\t''"version": "(.*)",/'$'\t''"version": "\1'"$VERSION_SUFFIX"'",/' package.json
CMD ["npm", "run", "start"]