first commit
This commit is contained in:
23
Dockerfile
Normal file
23
Dockerfile
Normal file
@@ -0,0 +1,23 @@
|
||||
# 使用官方Python镜像作为基础镜像
|
||||
FROM python:3.9-slim
|
||||
|
||||
# 设置工作目录
|
||||
WORKDIR /app
|
||||
|
||||
# 复制requirements.txt文件到工作目录
|
||||
COPY requirements.txt .
|
||||
|
||||
# 安装依赖
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# 复制所有项目文件到工作目录
|
||||
COPY . .
|
||||
|
||||
# 创建目标目录
|
||||
RUN mkdir -p /opt/doc/_post
|
||||
|
||||
# 设置环境变量
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
|
||||
# 运行主程序
|
||||
CMD ["python", "auto_check_files.py"]
|
||||
Reference in New Issue
Block a user