-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
58 lines (46 loc) · 1.04 KB
/
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
47
48
49
50
51
52
53
54
55
56
57
58
FROM node:19-alpine as builder
WORKDIR /app
COPY package.json .
COPY yarn.lock .
RUN echo network-timeout 600000 > .yarnrc && \
yarn install --frozen-lockfile && \
yarn cache clean
COPY src src
COPY tsconfig.json .
RUN yarn package
FROM alpine:edge as runner
# hadolint ignore=DL3018
RUN apk update && \
apk add --no-cache dumb-init && \
apk add --no-cache curl fontconfig font-noto-cjk && \
fc-cache -fv && \
apk add --no-cache \
chromium \
nss \
freetype \
freetype-dev \
harfbuzz \
ca-certificates \
ttf-freefont \
nodejs \
yarn \
xvfb \
xauth \
dbus \
dbus-x11 \
x11vnc \
&& \
apk add --update --no-cache tzdata && \
cp /usr/share/zoneinfo/Asia/Tokyo /etc/localtime && \
echo "Asia/Tokyo" > /etc/timezone && \
apk del tzdata
WORKDIR /app
COPY --from=builder /app/output .
COPY entrypoint.sh .
RUN chmod +x entrypoint.sh
ENV DISPLAY :99
ENV CONFIG_PATH /data/config.json
ENV APP_IDS_PATH /data/appIds.json
ENV NOTIFIED_PATH /data/notified.json
ENTRYPOINT ["dumb-init", "--"]
CMD ["/app/entrypoint.sh"]