wsj1995 commited on
Commit
c182040
·
1 Parent(s): 66206b3

feat: 脚本写入

Browse files
Files changed (1) hide show
  1. Dockerfile +2 -2
Dockerfile CHANGED
@@ -1,13 +1,13 @@
1
  # 使用 python:3.10.9-slim 作为基础镜像
2
  FROM python:3.10.9-slim
3
- ARG PLAYER_SCRIPT
4
  # 设置工作目录
5
  WORKDIR /app
6
 
7
  # 复制当前目录内容到容器内的 /app 目录
8
  COPY . /app
9
 
10
- RUN --mount=type=secret,id=SECRET_EXAMPLE,mode=0444,required=true && echo $(cat /run/secrets/SECRET_EXAMPLE) > /app/player.py && chmod 755 /app/player.py
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 && \