-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
31 lines (25 loc) · 792 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
FROM alpine:edge
RUN mkdir -p /home/elecbot
WORKDIR /home/elecbot
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories
RUN apk add --no-cache \
chromium \
nss \
freetype \
harfbuzz \
ca-certificates \
ttf-freefont \
nodejs \
yarn \
python3
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true \
PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
COPY . /home/elecbot
RUN yarn config set registry 'https://registry.npmmirror.com' && \
yarn config set sharp_binary_host "https://npmmirror.com/mirrors/sharp" && \
yarn config set sharp_libvips_binary_host "https://npmmirror.com/mirrors/sharp-libvips" && \
yarn global add node-gyp && \
yarn add sharp --verbose && \
yarn global add pm2 && \
yarn install && \
yarn cache clean