Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix: Dockerfile
  • Loading branch information
Hiram-Wong committed Aug 30, 2025
commit a95dbe4d01a58a6cb0a927054828f947ccd9a21c
11 changes: 1 addition & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ WORKDIR /app
# 克隆GitHub仓库到工作目录
RUN git clone https://github.com/hjdhnx/drpy-node.git .

# 设置npm镜像为npmmirror
RUN npm config set registry https://registry.npmmirror.com

# 安装项目依赖项和puppeteer
RUN yarn && yarn add puppeteer

Expand All @@ -31,12 +28,6 @@ RUN mkdir -p /tmp/drpys && \
# 但是无法用pm2
FROM alpine:latest AS runner

# OCI labels: https://github.com/opencontainers/image-spec/blob/main/annotations.md
LABEL org.opencontainers.image.authors="hjdhnx"
LABEL org.opencontainers.image.licenses="GPL-3.0"
LABEL org.opencontainers.image.title="drpyS"
LABEL org.opencontainers.image.source="https://github.com/hjdhnx/drpy-node"

# 创建一个工作目录
WORKDIR /app

Expand All @@ -61,7 +52,7 @@ RUN apk add --no-cache python3 \
# 激活python3虚拟环境并安装依pip3赖
RUN python3 -m venv /app/.venv && \
. /app/.venv/bin/activate && \
pip3 install -r /app/spider/py/base/requirements.txt -i https://mirrors.cloud.tencent.com/pypi/simple
pip3 install -r /app/spider/py/base/requirements.txt

# 暴露应用程序端口(根据您的项目需求调整)
EXPOSE 5757
Expand Down