25 lines
493 B
Docker
25 lines
493 B
Docker
FROM python:3.13-slim-bookworm
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
PYTHONUNBUFFERED=1 \
|
|
PIP_NO_CACHE_DIR=1
|
|
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends ffmpeg ca-certificates \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /app
|
|
|
|
COPY requirements.txt ./requirements.txt
|
|
COPY vendor ./vendor
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
COPY . .
|
|
|
|
RUN useradd -m -u 1000 botuser \
|
|
&& chown -R botuser:botuser /app
|
|
|
|
USER botuser
|
|
|
|
CMD ["python", "bot.py"]
|