16 lines
633 B
Docker
16 lines
633 B
Docker
FROM alpine:latest
|
|
ENV UV_LINK_MODE=copy \
|
|
UV_COMPILE_BYTECODE=1 \
|
|
UV_PYTHON_DOWNLOADS=never \
|
|
UV_PYTHON=python3 \
|
|
PYTHONUNBUFFERED=1
|
|
COPY app/requirements.txt /tmp/requirements.txt
|
|
RUN apk add --no-cache python3 py3-virtualenv py3-pip gcc python3-dev py3-cryptography py3-pycryptodomex py3-pynacl py3-pycountry py3-requests py3-aiohttp py3-brotli libc-dev libffi-dev make ffmpeg uv
|
|
|
|
RUN uv venv /opt/venv && \
|
|
VIRTUAL_ENV='/opt/venv' uv pip install -r /tmp/requirements.txt
|
|
COPY app/ /app
|
|
|
|
WORKDIR /app
|
|
VOLUME /downloadTemp
|
|
ENTRYPOINT [ "ash", "-c", "/opt/venv/bin/python -u bot.py | tee /var/log/djbot.log" ]
|