RSSHub/Dockerfile.arm32v7

32 lines
1.0 KiB
Docker
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

FROM arm32v7/node:8.16-slim
MAINTAINER junfeng <junfeng_pan96@qq.com>
# 使用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"]