File size: 598 Bytes
36b7c16 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# Use official Python base image
FROM python:3.9-slim
# Set working directory inside the container
WORKDIR /app
# Copy requirements file
COPY requirements.txt .
# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt
# 复制核心应用文件
COPY app.py .
COPY auth.py .
COPY client.py .
COPY routes.py .
COPY utils.py .
COPY config.py .
COPY retry.py .
COPY static/ static/
COPY templates/ templates/
RUN chmod -R 0755 /app
# Expose the port (Flask 默认端口)
EXPOSE 5000
# 设置 UTF-8 避免中文乱码
ENV LANG=C.UTF-8
# 启动主程序
CMD ["python", "app.py"]
|