-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
42 lines (31 loc) · 1 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
FROM zenika/alpine-chrome:with-puppeteer-xvfb AS runner
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME/bin:$PATH"
# hadolint ignore=DL3002
USER root
# hadolint ignore=DL3018,DL3016
RUN apk upgrade --no-cache --available && \
apk update && \
apk add --update --no-cache tzdata x11vnc && \
cp /usr/share/zoneinfo/Asia/Tokyo /etc/localtime && \
echo "Asia/Tokyo" > /etc/timezone && \
apk del tzdata && \
npm install -g corepack && \
corepack enable
WORKDIR /app
COPY pnpm-lock.yaml ./
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm fetch
COPY package.json tsconfig.json ./
COPY src src
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile --offline
COPY entrypoint.sh ./
RUN chmod +x ./entrypoint.sh
ENV TZ=Asia/Tokyo
ENV NODE_ENV=production
ENV CONFIG_PATH=/data/config.json
ENV CHROMIUM_PATH=/usr/bin/chromium-browser
ENV LOG_DIR=/data/logs/
ENV APP_IDS_PATH=/data/appIds.json
ENV NOTIFIED_PATH=/data/notified.json
ENTRYPOINT ["tini", "--"]
CMD ["/app/entrypoint.sh"]