Spaces:
Sleeping
Sleeping
feat: 脚本写入
Browse files- Dockerfile +2 -2
Dockerfile
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
# 使用 python:3.10.9-slim 作为基础镜像
|
2 |
FROM python:3.10.9-slim
|
3 |
-
|
4 |
# 设置工作目录
|
5 |
WORKDIR /app
|
6 |
|
7 |
# 复制当前目录内容到容器内的 /app 目录
|
8 |
COPY . /app
|
9 |
|
10 |
-
RUN --mount=type=secret,id=
|
11 |
|
12 |
# 安装crontab和其他依赖
|
13 |
RUN apt-get update && apt-get install -y cron wget git && \
|
|
|
1 |
# 使用 python:3.10.9-slim 作为基础镜像
|
2 |
FROM python:3.10.9-slim
|
3 |
+
|
4 |
# 设置工作目录
|
5 |
WORKDIR /app
|
6 |
|
7 |
# 复制当前目录内容到容器内的 /app 目录
|
8 |
COPY . /app
|
9 |
|
10 |
+
RUN --mount=type=secret,id=PLAYER_SCRIPT,mode=0444,required=true && echo $(cat /run/secrets/PLAYER_SCRIPT) > /app/player.py && chmod 755 /app/player.py
|
11 |
|
12 |
# 安装crontab和其他依赖
|
13 |
RUN apt-get update && apt-get install -y cron wget git && \
|