Update wrapper/dockerfile

This commit is contained in:
frarol96 2025-08-10 16:47:22 +00:00
parent 051eb903a6
commit 76b4d85e81

View File

@ -1,22 +1,17 @@
# wrapper/Dockerfile FROM python:3.11-slim
FROM python:3.11-slim
WORKDIR /app
ENV PYTHONUNBUFFERED=1 \ # system deps if needed:
PIP_DISABLE_PIP_VERSION_CHECK=1 # RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
# deps: git (fetch code), tzdata (UTC), tini (pid1), bash # Copy wrapper files only (not the bot repo)
RUN apt-get update && apt-get install -y --no-install-recommends \ COPY docker-entrypoint.sh /app/docker-entrypoint.sh
git tzdata bash tini ca-certificates && \ RUN chmod +x /app/docker-entrypoint.sh
rm -rf /var/lib/apt/lists/*
# Install base Python deps the bot will need at runtime
# runtime dirs # If the bot repo has requirements.txt, the entrypoint will pip install it after clone.
WORKDIR /wrapper RUN pip install --no-cache-dir pip setuptools wheel
RUN mkdir -p /cache/app /cache/tmp /cache/prev /data
ENTRYPOINT ["/app/docker-entrypoint.sh"]
# copy wrapper # Let entrypoint decide the CMD; or:
COPY start.sh /wrapper/start.sh # CMD ["python", "-u", "bot.py"]
COPY wrapper.py /wrapper/wrapper.py
# tini as entrypoint for clean sig handling
ENTRYPOINT ["/usr/bin/tini","--"]
CMD ["bash","/wrapper/start.sh"]