BBrother commited on
Commit
5965100
1 Parent(s): 2cbbd90

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +17 -5
Dockerfile CHANGED
@@ -5,12 +5,14 @@ FROM golang:alpine AS builder
5
  RUN apk update && apk add --no-cache \
6
  curl \
7
  tar \
8
- jq
 
 
 
9
 
10
  # 创建新的工作目录
11
  WORKDIR /app
12
 
13
-
14
  # 下载并解压文件,并给予所有用户读写和执行权限
15
  RUN version=$(basename $(curl -sL -o /dev/null -w %{url_effective} https://github.com/pandora-next/deploy/releases/latest)) \
16
  && base_url="https://github.com/pandora-next/deploy/releases/expanded_assets/$version" \
@@ -39,8 +41,18 @@ RUN chmod 777 ./PandoraNext
39
  # 创建全局缓存目录并提供最宽松的权限
40
  RUN mkdir /.cache && chmod 777 /.cache
41
 
 
 
 
 
 
 
 
 
 
 
42
  # 开放端口
43
- EXPOSE 7860
44
 
45
- # 启动命令
46
- CMD ["./PandoraNext"]
 
5
  RUN apk update && apk add --no-cache \
6
  curl \
7
  tar \
8
+ jq \
9
+ git \
10
+ python3 \
11
+ py3-pip
12
 
13
  # 创建新的工作目录
14
  WORKDIR /app
15
 
 
16
  # 下载并解压文件,并给予所有用户读写和执行权限
17
  RUN version=$(basename $(curl -sL -o /dev/null -w %{url_effective} https://github.com/pandora-next/deploy/releases/latest)) \
18
  && base_url="https://github.com/pandora-next/deploy/releases/expanded_assets/$version" \
 
41
  # 创建全局缓存目录并提供最宽松的权限
42
  RUN mkdir /.cache && chmod 777 /.cache
43
 
44
+ # 克隆PandoraNext-Helper仓库
45
+ RUN git clone https://github.com/nianhua99/PandoraNext-Helper.git
46
+
47
+ # 安装PandoraNext-Helper的Python依赖
48
+ RUN pip3 install --no-cache-dir -r PandoraNext-Helper/requirements.txt
49
+
50
+ # 设置环境变量
51
+ ENV PANDORA_NEXT_DOMAIN=0.0.0.0:7860
52
+ ENV PANDORA_NEXT_PATH=/app
53
+
54
  # 开放端口
55
+ EXPOSE 7860 8181
56
 
57
+ # 启动命令,这里使用waitress_run.py启动Python服务
58
+ CMD ["python3", "PandoraNext-Helper/waitress_run.py"]