spider/Dockerfile
2019-04-03 11:34:29 +08:00

25 lines
549 B
Docker
Raw Permalink 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.

#构建步骤
#1. 构建zhl/node_env, 用于npm install
# docker build -t zhl/node_env -f Dockerfile_env .
#2. 构建运行下载代码的环境
# docker build -t spider .
#说明:
# 1. 构建一次,重启下载程序,只要运行 docker restart spider即可
# 2. 如果有添加新的第三方依赖, 需重新运行 docker build -t spider .
FROM zhl/node_env:latest
RUN mkdir -p /data/service
COPY ./ /data/service/
RUN mkdir -p /data/download
RUN mkdir -p /data/logs
WORKDIR /data/service
RUN npm install
CMD npm run start