forked from DIYgod/RSSHub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.arm32v7
31 lines (22 loc) · 1.04 KB
/
Dockerfile.arm32v7
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 arm32v7/node:8.16-slim
MAINTAINER junfeng <[email protected]>
# 使用163镜像,若不需要可以注释
RUN echo -e "deb http://mirrors.ustc.edu.cn/debian/ stretch main \ndeb http://mirrors.ustc.edu.cn/debian/ stretch-updates main " > /etc/apt/sources.list
# 复用缓存, 如果github文件下载失败,可以手动下载,放至项目根目录,注释下方ADD语句,改用下方COPY语句
ADD https://github.com/junfengP/dumb-init/releases/download/v1.2.0/dumb-init-armhf /usr/local/bin/dumb-init
# COPY dumb-init-armhf /usr/local/bin/dumb-init
RUN chmod +x /usr/local/bin/dumb-init
ARG USE_CHINA_NPM_REGISTRY=1;
ENV NODE_ENV production
WORKDIR /app
COPY package.json /app
RUN if [ "$USE_CHINA_NPM_REGISTRY" = 1 ]; then \
echo 'use npm mirror'; npm config set registry https://registry.npm.taobao.org; \
fi;
# 跳过Chromium下载,puppeteer不会下载chrome-arm
RUN export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true \
&& npm install --production
COPY . /app
EXPOSE 1200
ENTRYPOINT ["dumb-init", "--"]
CMD ["npm", "run", "start"]