From 76b4d85e8191a67a6556c3e630da2f16762c66ca Mon Sep 17 00:00:00 2001 From: frarol96 Date: Sun, 10 Aug 2025 16:47:22 +0000 Subject: [PATCH] Update wrapper/dockerfile --- wrapper/dockerfile | 39 +++++++++++++++++---------------------- 1 file changed, 17 insertions(+), 22 deletions(-) diff --git a/wrapper/dockerfile b/wrapper/dockerfile index bd427c5..d73de3b 100644 --- a/wrapper/dockerfile +++ b/wrapper/dockerfile @@ -1,22 +1,17 @@ -# wrapper/Dockerfile -FROM python:3.11-slim - -ENV PYTHONUNBUFFERED=1 \ - PIP_DISABLE_PIP_VERSION_CHECK=1 - -# deps: git (fetch code), tzdata (UTC), tini (pid1), bash -RUN apt-get update && apt-get install -y --no-install-recommends \ - git tzdata bash tini ca-certificates && \ - rm -rf /var/lib/apt/lists/* - -# runtime dirs -WORKDIR /wrapper -RUN mkdir -p /cache/app /cache/tmp /cache/prev /data - -# copy wrapper -COPY start.sh /wrapper/start.sh -COPY wrapper.py /wrapper/wrapper.py - -# tini as entrypoint for clean sig handling -ENTRYPOINT ["/usr/bin/tini","--"] -CMD ["bash","/wrapper/start.sh"] +FROM python:3.11-slim + +WORKDIR /app +# system deps if needed: +# RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/* + +# Copy wrapper files only (not the bot repo) +COPY docker-entrypoint.sh /app/docker-entrypoint.sh +RUN chmod +x /app/docker-entrypoint.sh + +# Install base Python deps the bot will need at runtime +# If the bot repo has requirements.txt, the entrypoint will pip install it after clone. +RUN pip install --no-cache-dir pip setuptools wheel + +ENTRYPOINT ["/app/docker-entrypoint.sh"] +# Let entrypoint decide the CMD; or: +# CMD ["python", "-u", "bot.py"]