arronlx commited on
Commit
1c2c5bd
·
verified ·
1 Parent(s): d9cf0b6

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -3
Dockerfile CHANGED
@@ -1,14 +1,20 @@
1
  FROM ghcr.io/senshinya/moontv:latest
2
 
3
-
4
  # 切换到 root 用户以进行权限调整
5
  USER root
6
 
7
  # 安装 curl 用于下载文件(如果基础镜像没有)
8
  RUN apk add --no-cache curl
9
 
10
- # 下载并替换配置文件
11
- RUN curl -Lo /app/config.json https://files.arron.eu.org/tvconfig
 
 
 
 
 
 
 
12
 
13
  # 确保文件权限正确
14
  RUN chown nextjs:nodejs /app/config.json
 
1
  FROM ghcr.io/senshinya/moontv:latest
2
 
 
3
  # 切换到 root 用户以进行权限调整
4
  USER root
5
 
6
  # 安装 curl 用于下载文件(如果基础镜像没有)
7
  RUN apk add --no-cache curl
8
 
9
+ ARG CONFIG_URL
10
+
11
+
12
+ # 下载并替换配置文件,使用 CONFIG_URL 变量
13
+ RUN if [ -n "$CONFIG_URL" ]; then \
14
+ curl -Lo /app/config.json "$CONFIG_URL"; \
15
+ else \
16
+ echo "CONFIG_URL is not set. Skipping configuration file download."; \
17
+ fi
18
 
19
  # 确保文件权限正确
20
  RUN chown nextjs:nodejs /app/config.json