arronlx commited on
Commit
ef9cc06
·
verified ·
1 Parent(s): 73b149f

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +17 -1
Dockerfile CHANGED
@@ -1 +1,17 @@
1
- From ghcr.io/senshinya/moontv:latest
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM ghcr.io/senshinya/moontv:latest
2
+
3
+ # 安装curl(如果基础镜像中没有)
4
+ RUN apt-get update && apt-get install -y curl || apk add --no-cache curl
5
+
6
+ # 从指定URL下载config.json(使用环境变量配置URL)
7
+ ARG CONFIG_URL
8
+ ENV CONFIG_URL=${CONFIG_URL}
9
+
10
+ RUN if [ -n "$CONFIG_URL" ]; then \
11
+ curl -o /app/config.json "$CONFIG_URL" || echo "警告: 无法下载配置文件,使用默认配置"; \
12
+ else \
13
+ echo "错误: 未设置CONFIG_URL环境变量"; \
14
+ fi
15
+
16
+ # 可选:设置容器启动时使用的配置路径
17
+ ENV CONFIG_PATH=/app/config.json