From 27b959172388fa541e16a26d1127a333c8ed6137 Mon Sep 17 00:00:00 2001 From: Clivia <132346501+Yanyutin753@users.noreply.github.com> Date: Fri, 8 Mar 2024 14:30:01 +0800 Subject: [PATCH] feat simply flask run --- Dockerfile | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index f1ddb66..2d0e426 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,15 +10,13 @@ COPY . /app # 设置环境变量 ENV PYTHONUNBUFFERED=1 -RUN chmod +x /app/start.sh - -RUN apt update && apt install -y jq +RUN chmod +x /app/main.py # # 设置 pip 源为清华大学镜像 # RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple # 安装任何所需的依赖项 -RUN pip install --no-cache-dir flask flask_apscheduler gunicorn requests Pillow flask-cors tiktoken fake_useragent redis websocket-client pysocks requests[socks] websocket-client[optional] +RUN pip install --no-cache-dir flask flask_apscheduler requests Pillow flask-cors tiktoken fake_useragent redis websocket-client pysocks requests[socks] websocket-client[optional] # 在容器启动时运行 Flask 应用 -CMD ["/app/start.sh"] +CMD ["python3", "main.py"]