fengmiguoji commited on
Commit
8176e9d
·
verified ·
1 Parent(s): e1799b8

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -8
Dockerfile CHANGED
@@ -19,18 +19,15 @@ WORKDIR /app
19
  # Copy the application source code to the container
20
  COPY . /app
21
 
22
- # (新增)在容器中创建 logs 目录并赋予写权限
23
- RUN mkdir -p logs && chmod 777 logs
24
 
25
- # Install pip and set the PyPI mirror (Aliyun)
26
  RUN pip3 install -i https://mirrors.aliyun.com/pypi/simple/ -U pip \
27
  && pip3 config set global.index-url https://mirrors.aliyun.com/pypi/simple/
28
-
29
- # Install dependencies directly
30
  RUN pip3 install --no-cache-dir -r requirements.txt
31
 
32
- # Make the start script executable
33
  RUN chmod +x start.sh
34
 
35
- # Command to run on container start
36
- CMD ["./start.sh"]
 
19
  # Copy the application source code to the container
20
  COPY . /app
21
 
22
+ # 可以直接给 /app 目录加权限
23
+ RUN chmod -R 777 /app
24
 
25
+ # 安装 pip, 设置镜像, 安装依赖
26
  RUN pip3 install -i https://mirrors.aliyun.com/pypi/simple/ -U pip \
27
  && pip3 config set global.index-url https://mirrors.aliyun.com/pypi/simple/
 
 
28
  RUN pip3 install --no-cache-dir -r requirements.txt
29
 
30
+ # Make the start script executable (如果有这个文件)
31
  RUN chmod +x start.sh
32
 
33
+ CMD ["./start.sh"]