BBrother commited on
Commit
fc643b6
1 Parent(s): ca9d112

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -28
Dockerfile CHANGED
@@ -5,25 +5,12 @@ FROM golang:alpine AS builder
5
  RUN apk update && apk add --no-cache \
6
  curl \
7
  tar \
8
- jq \
9
- git \
10
- python3 \
11
- py3-pip
12
-
13
- # 安装 Python 和 pip
14
- RUN apk add --update --no-cache python3 py3-pip
15
- RUN python3 -m ensurepip
16
-
17
- # 为应用程序创建一个虚拟环境
18
- RUN python3 -m venv /app/venv
19
-
20
- # 激活虚拟环境并安装依赖项
21
- COPY requirements.txt /app/
22
- RUN . /app/venv/bin/activate && pip install --no-cache-dir -r /app/requirements.txt
23
 
24
  # 创建新的工作目录
25
  WORKDIR /app
26
 
 
27
  # 下载并解压文件,并给予所有用户读写和执行权限
28
  RUN version=$(basename $(curl -sL -o /dev/null -w %{url_effective} https://github.com/pandora-next/deploy/releases/latest)) \
29
  && base_url="https://github.com/pandora-next/deploy/releases/expanded_assets/$version" \
@@ -52,18 +39,8 @@ RUN chmod 777 ./PandoraNext
52
  # 创建全局缓存目录并提供最宽松的权限
53
  RUN mkdir /.cache && chmod 777 /.cache
54
 
55
- # 克隆PandoraNext-Helper仓库
56
- RUN git clone https://github.com/nianhua99/PandoraNext-Helper.git
57
-
58
- # 安装PandoraNext-Helper的Python依赖
59
- RUN pip3 install --no-cache-dir -r PandoraNext-Helper/requirements.txt
60
-
61
- # 设置环境变量
62
- ENV PANDORA_NEXT_DOMAIN=0.0.0.0:7860
63
- ENV PANDORA_NEXT_PATH=/app
64
-
65
  # 开放端口
66
- EXPOSE 7860 8181
67
 
68
- # 运行应用程序时,确保激活虚拟环境
69
- CMD ["/app/venv/bin/python3", "/app/PandoraNext-Helper/waitress_run.py"]
 
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
  # 创建全局缓存目录并提供最宽松的权限
40
  RUN mkdir /.cache && chmod 777 /.cache
41
 
 
 
 
 
 
 
 
 
 
 
42
  # 开放端口
43
+ EXPOSE 7860
44
 
45
+ # 启动命令
46
+ CMD ["./PandoraNext"]