From c04a9fbfbd80396be4ed0d25695965eaff9dee6e Mon Sep 17 00:00:00 2001 From: zhullyb Date: Thu, 16 Nov 2023 08:53:07 +0800 Subject: [PATCH] set WORKDIR --- Dockerfile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index d28b8fb..5a12c87 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,8 @@ FROM python:3.11-alpine EXPOSE 5000 -COPY main.py screenshot.py utils.py requirements.txt geckodriver /root/ +WORKDIR /root +COPY requirements.txt /root/ +RUN pip install -r /root/requirements.txt RUN mkdir /root/templates \ && mkdir -p /usr/share/fonts/misans \ && apk add --no-cache \ @@ -9,8 +11,8 @@ RUN mkdir /root/templates \ font-noto \ font-noto-cjk \ font-noto-cjk-extra \ - font-noto-emoji \ - && pip install -r /root/requirements.txt + font-noto-emoji COPY templates/ /root/templates COPY MiSans-Regular.ttf /usr/share/fonts/misans/ -CMD env GECKODRIVER_PATH=/root/geckodriver gunicorn --threads 4 -b 0.0.0.0:5000 /root/main:app +COPY main.py screenshot.py utils.py geckodriver /root/ +CMD env GECKODRIVER_PATH=/root/geckodriver gunicorn --threads 4 -b 0.0.0.0:5000 /main:app