From 3003cbf3591c15dd599218ec015f74610eef9139 Mon Sep 17 00:00:00 2001 From: HibiKier <775757368@qq.com> Date: Wed, 14 Aug 2024 13:35:03 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Dockerfile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .dockerignore | 15 +++++++++++++++ Dockerfile | 19 +++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..5d0f2bf2 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,15 @@ +.devcontainer/ +.github/ +.vscode/ +assets/ +k8s/ +tests/ +.dockerignore +.editorconfig +.gitignore +.pre-commit-config.yaml +.prettier* +docker-compose.yml +Dockerfile +LICENSE +*.md \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..18776e5a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,19 @@ +FROM python:3.11-slim-bookworm + +EXPOSE 8080 + +WORKDIR /app/zhenxun + +COPY . /app/zhenxun + +RUN pip install poetry -i https://mirrors.aliyun.com/pypi/simple/ + +RUN poetry install + +VOLUME /app/zhenxun/data /app/zhenxun/data + +VOLUME /app/zhenxun/resources /app/zhenxun/resources + +RUN poetry run playwright install --with-deps chromium + +CMD ["poetry", "run", "python", "bot.py"] \ No newline at end of file