diff --git a/dockerfile b/dockerfile index 52e0780..f179917 100644 --- a/dockerfile +++ b/dockerfile @@ -10,6 +10,9 @@ RUN apt-get update && apt-get install -y \ python3-dev \ && rm -rf /var/lib/apt/lists/* +# Install tini for better signal handling in container +RUN apt-get update && apt-get install -y tini + # Copy requirements first to leverage Docker cache COPY requirements.txt . @@ -39,5 +42,5 @@ USER bot ENV PYTHONUNBUFFERED=1 ENV CONFIG_PATH=/app/config.ini -# Run the bot using the entrypoint script -ENTRYPOINT ["/bin/sh", "/app/entrypoint.sh"] \ No newline at end of file +# Run the bot using tini and entrypoint script +ENTRYPOINT ["tini", "--", "/bin/sh", "entrypoint.sh"] \ No newline at end of file