install.js,里面的下载是依赖于electron-download这个模块
所以在Dockerfile中修改:

FROM node:latest

RUN mkdir -p /compImg/service
WORKDIR /compImg/service
COPY . /compImg/service

# 安装cnpm 即可解决,速度很快
RUN npm install -g cnpm --registry=https://registry.npm.taobao.org
RUN cnpm install
RUN cnpm install pm2 -g

EXPOSE 3000

CMD [ "pm2-docker", "start", "pm2.json" ]
Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐