README / Dockerfile
nexus33rd's picture
Upload 29 files
9b1b573 verified
Raw History Blame Contribute Delete
1.03 kB
FROM python:3.12-slim
ENV PYTHONUNBUFFERED=1 \
QBT_PROFILE=/config \
QBITTORRENT_HOST=127.0.0.1 \
QBITTORRENT_PORT=8080 \
QBITTORRENT_SAVE_PATH=/downloads \
PORT=5000
RUN apt-get update \
&& apt-get install -y --no-install-recommends qbittorrent-nox aria2 rclone ca-certificates bash tini curl p7zip-full gcc libc6-dev \
&& rm -rf /var/lib/apt/lists/*
RUN useradd -m -u 1000 qbittorrent
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY app.py .
COPY aria2.py .
COPY bot ./bot
COPY static ./static
COPY templates ./templates
COPY qbittorrent/config/qBittorrent.conf /defaults/qBittorrent.conf
COPY entrypoint.sh /entrypoint.sh
RUN mkdir -p /app/uploads /config /downloads /defaults \
&& sed -i 's/\r$//' /entrypoint.sh \
&& chown -R qbittorrent:qbittorrent /app /config /downloads /defaults /entrypoint.sh \
&& chmod +x /entrypoint.sh
USER qbittorrent
EXPOSE 5000
ENTRYPOINT ["/usr/bin/tini", "--", "/entrypoint.sh"]