25 lines
573 B
Docker
25 lines
573 B
Docker
FROM python:3.11-alpine
|
|
|
|
# Ensure deterministic, unbuffered logs
|
|
ENV PYTHONDONTWRITEBYTECODE=1
|
|
ENV PYTHONUNBUFFERED=1
|
|
|
|
WORKDIR /app
|
|
|
|
COPY requirements.txt requirements.txt
|
|
|
|
RUN apk add --no-cache build-base ffmpeg libffi libffi-dev libsodium libsodium-dev \
|
|
&& pip3 install --no-cache-dir -r requirements.txt \
|
|
&& apk del build-base libffi-dev libsodium-dev
|
|
|
|
RUN adduser -D -h /app app \
|
|
&& chown -R app:app /app
|
|
|
|
COPY --chown=app:app . .
|
|
|
|
USER app
|
|
|
|
# Set stop signal to SIGTERM to ensure clean shutdown
|
|
STOPSIGNAL SIGTERM
|
|
|
|
CMD ["python3", "/app/discodrome.py"] |