Murasame52 commited on
Commit
b73fb73
·
verified ·
1 Parent(s): 5f8f3ef

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -3
Dockerfile CHANGED
@@ -1,8 +1,11 @@
1
  # =============================================================================
2
- # Sub2API - 官方最新镜像 + 自定义启动脚本
3
  # =============================================================================
4
  FROM ghcr.io/wei-shaw/sub2api:latest
5
 
 
 
 
6
  # 创建软链接,让脚本中的 /app/hub-gateway 指向实际的 /app/sub2api
7
  RUN ln -s /app/sub2api /app/hub-gateway
8
 
@@ -10,11 +13,11 @@ RUN ln -s /app/sub2api /app/hub-gateway
10
  COPY start-space.sh /app/start-space.sh
11
  RUN chmod +x /app/start-space.sh
12
 
13
- # 覆盖或补充环境变量默认值(官方镜像已有合理默认值)
14
  ENV SERVER_PORT=7860 \
15
  TZ=Asia/Shanghai
16
 
17
- # 健康检查(确保与您的端口一致)
18
  HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=5 \
19
  CMD wget -q -T 5 -O /dev/null http://localhost:${SERVER_PORT:-7860}/health || exit 1
20
 
 
1
  # =============================================================================
2
+ # Sub2API - 官方最新镜像 + 自定义启动脚本(补装 Python3)
3
  # =============================================================================
4
  FROM ghcr.io/wei-shaw/sub2api:latest
5
 
6
+ # 官方镜像可能基于 Alpine,补装 Python3 和 bcrypt(供脚本解析连接串和加密密码)
7
+ RUN apk add --no-cache python3 py3-bcrypt
8
+
9
  # 创建软链接,让脚本中的 /app/hub-gateway 指向实际的 /app/sub2api
10
  RUN ln -s /app/sub2api /app/hub-gateway
11
 
 
13
  COPY start-space.sh /app/start-space.sh
14
  RUN chmod +x /app/start-space.sh
15
 
16
+ # 覆盖或补充环境变量默认值
17
  ENV SERVER_PORT=7860 \
18
  TZ=Asia/Shanghai
19
 
20
+ # 健康检查
21
  HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=5 \
22
  CMD wget -q -T 5 -O /dev/null http://localhost:${SERVER_PORT:-7860}/health || exit 1
23