From 3fa4e516c81a837149f5ef2fdbe7eedf50daeb8d Mon Sep 17 00:00:00 2001 From: Jason Forhise Date: Tue, 15 Mar 2022 20:48:50 +0800 Subject: =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BA=86=20Docker=20=E7=9A=84?= =?UTF-8?q?=E9=83=A8=E7=BD=B2=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 现在可以在宿主机访问日志等会变动的文件与配置文件 --- Dockerfile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 Dockerfile (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..6f3f8a2 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM flyingjoe/uvicorn-gunicorn-fastapi:python3.9-slim + +WORKDIR /app + +ENV PATH="${PATH}:/root/.local/bin" + +COPY ./ /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 + +VOLUME /app/accounts /app/data + +CMD python3 main.py \ No newline at end of file -- cgit v1.2.3