Add docker/Dockerfile-DMbot.py

This commit is contained in:
driftywinds
2025-05-12 10:56:03 +00:00
parent ec8fb6a4b4
commit 40dd858c4d

View File

@@ -0,0 +1,26 @@
FROM python:3.11-alpine
WORKDIR /app
# Install system dependencies
RUN apk add --no-cache --virtual .build-deps \
gcc \
musl-dev \
libffi-dev \
&& apk add --no-cache bash
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
COPY DMbot.py .
# Cleanup build dependencies
RUN apk del .build-deps
# Ensure proper permissions and unbuffered output
RUN chmod a+x DMbot.py
ENV PYTHONUNBUFFERED=1
CMD ["python3", "-u", "DMbot.py"]