-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
49 lines (36 loc) · 1.06 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
FROM node:16-alpine as base
# Install Dependencies
RUN apk add --no-cache \
chromium \
nss \
freetype \
harfbuzz \
ca-certificates \
ttf-freefont \
tzdata
RUN apk add --no-cache curl fontconfig \
&& curl -O https://noto-website.storage.googleapis.com/pkgs/NotoSansCJKjp-hinted.zip \
&& mkdir -p /usr/share/fonts/NotoSansCJKjp \
&& unzip NotoSansCJKjp-hinted.zip -d /usr/share/fonts/NotoSansCJKjp/ \
&& rm NotoSansCJKjp-hinted.zip \
&& fc-cache -fv
# Tell Puppeteer to skip installing Chrome. We'll be using the installed package.
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true \
PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
ENV TZ Asia/Tokyo
# Build App
ENV NODE_ENV production
WORKDIR /app
COPY package.json yarn.lock ./
RUN yarn install --immutable
COPY tsconfig.json ./
COPY src ./src
FROM base as builder
RUN yarn global add typescript
RUN yarn build
FROM base
COPY --from=builder /app/dist ./dist
# Add Crontab
ADD crontab /var/spool/crontab/root
RUN crontab /var/spool/crontab/root
ENTRYPOINT ["crond", "-f"]