From e2b59e8efea488a4de4cd09617124e21879c816a Mon Sep 17 00:00:00 2001 From: RockChinQ <1010553892@qq.com> Date: Tue, 12 Sep 2023 10:21:03 +0000 Subject: [PATCH] =?UTF-8?q?ci:=20=E6=9B=B4=E6=96=B0Dockerfile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index 54d4c44e..8261a1fe 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,17 +1,14 @@ -FROM python:3.9-slim +FROM python:3.10.13-alpine3.18 WORKDIR /QChatGPT -RUN sed -i "s/deb.debian.org/mirrors.tencent.com/g" /etc/apt/sources.list \ - && sed -i 's|security.debian.org/debian-security|mirrors.tencent.com/debian-security|g' /etc/apt/sources.list \ - && apt-get clean \ - && apt-get update \ - && apt-get -y upgrade \ - && apt-get install -y git \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - COPY . /QChatGPT/ -RUN pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple +RUN ls -CMD [ "python", "main.py" ] \ No newline at end of file +RUN pip install -r requirements.txt +RUN pip install -U websockets==10.0 + +# 生成配置文件 +RUN python main.py + +CMD [ "python", "main.py" ] \ No newline at end of file