clash-linux commited on
Commit
e902fb4
·
verified ·
1 Parent(s): 5a8991e

Upload 11 files

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -2
Dockerfile CHANGED
@@ -6,6 +6,7 @@ WORKDIR /app
6
 
7
  # 安装系统依赖
8
  # 添加 build-base (包含gcc, make等) 和 python3-dev, musl-dev, libffi-dev 用于编译
 
9
  RUN apk add --no-cache \
10
  curl \
11
  ca-certificates \
@@ -15,7 +16,8 @@ RUN apk add --no-cache \
15
  build-base \
16
  python3-dev \
17
  musl-dev \
18
- libffi-dev
 
19
 
20
  # 设置时区为亚洲/上海
21
  ENV TZ=Asia/Shanghai
@@ -55,12 +57,15 @@ COPY requirements.txt ./
55
  # 升级 pip
56
  RUN pip install --upgrade pip
57
 
 
 
 
58
  # 安装Python依赖
59
  RUN echo "Installing Python dependencies..." && \
60
  pip install --no-cache-dir -r requirements.txt
61
 
62
  # 可选:删除构建依赖以减小镜像体积
63
- # RUN apk del build-base python3-dev musl-dev libffi-dev
64
 
65
  # 设置环境变量
66
  ENV PYTHONDONTWRITEBYTECODE=1 \
 
6
 
7
  # 安装系统依赖
8
  # 添加 build-base (包含gcc, make等) 和 python3-dev, musl-dev, libffi-dev 用于编译
9
+ # 添加 yaml-dev 以确保libyaml头文件可用
10
  RUN apk add --no-cache \
11
  curl \
12
  ca-certificates \
 
16
  build-base \
17
  python3-dev \
18
  musl-dev \
19
+ libffi-dev \
20
+ yaml-dev
21
 
22
  # 设置时区为亚洲/上海
23
  ENV TZ=Asia/Shanghai
 
57
  # 升级 pip
58
  RUN pip install --upgrade pip
59
 
60
+ # 安装Cython 和 PyYAML 构建时可能需要的 setuptools
61
+ RUN pip install --no-cache-dir Cython setuptools
62
+
63
  # 安装Python依赖
64
  RUN echo "Installing Python dependencies..." && \
65
  pip install --no-cache-dir -r requirements.txt
66
 
67
  # 可选:删除构建依赖以减小镜像体积
68
+ # RUN apk del build-base python3-dev musl-dev libffi-dev yaml-dev
69
 
70
  # 设置环境变量
71
  ENV PYTHONDONTWRITEBYTECODE=1 \