From 0b7c87a43a9e0bb65e71989d5cebe8e3135366e6 Mon Sep 17 00:00:00 2001 From: SharzyL Date: Tue, 14 May 2024 20:04:19 +0800 Subject: [PATCH] fix: docker image entrypoint --- Dockerfile | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index cc5b625..69957b7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,20 +4,21 @@ FROM python:$PYTHON_BASE AS builder # install PDM RUN pip install -U pdm ENV PDM_CHECK_UPDATE=false -COPY pyproject.toml pdm.lock README.md /project/ -COPY tg_searcher /project/tg_searcher +COPY pyproject.toml pdm.lock README.md /app/ +COPY tg_searcher /app/tg_searcher # install dependencies and project into the local packages directory -WORKDIR /project +WORKDIR /app RUN pdm install --check --prod --no-editable # run stage FROM python:$PYTHON_BASE # retrieve packages from build stage -COPY --from=builder /project/.venv/ /project/.venv -ENV PATH="/project/.venv/bin:$PATH" -COPY tg_searcher /project/tg_searcher -WORKDIR /project -CMD ["python", "tg_searcher/__main__.py"] +COPY --from=builder /app/.venv/ /app/.venv +ENV PATH="/app/.venv/bin:$PATH" +COPY tg_searcher /app/tg_searcher +WORKDIR /app +ENTRYPOINT ["python", "tg_searcher/__main__.py"] +CMD ["-f", "./config/searcher.yaml"]