From 275463bf0be6bf626383bd732ae9d70e117a18ff Mon Sep 17 00:00:00 2001 From: yume233 Date: Thu, 6 Oct 2022 16:02:16 +0800 Subject: =?UTF-8?q?=E2=9C=A8=20=E6=96=B0=E5=A2=9E=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E6=9E=84=E5=BB=BAdocker=E9=95=9C=E5=83=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile index 6f3f8a2..2694202 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,11 +4,20 @@ WORKDIR /app ENV PATH="${PATH}:/root/.local/bin" -COPY ./ /app/ +ADD . /app/ -RUN /usr/local/bin/python -m pip install --no-cache-dir --upgrade --quiet pip \ - && pip install --no-cache-dir --upgrade --quiet -r requirements.txt +EXPOSE 20000 + +RUN sed -i "s@http://deb.debian.org@http://mirrors.aliyun.com@g" /etc/apt/sources.list && rm -Rf /var/lib/apt/lists/* && apt-get update + +RUN apt install curl -y + +RUN curl -sSL https://install.python-poetry.org | python3 - + +RUN /usr/local/bin/python -m pip install --no-cache-dir --upgrade --quiet pip + +RUN poetry install VOLUME /app/accounts /app/data -CMD python3 main.py \ No newline at end of file +CMD poetry run python3 main.py \ No newline at end of file -- cgit v1.2.3