commit b12f4212984022df36c51a6c540d15035c66023f Author: Eliezer Croitoru Date: Sat Dec 23 11:26:15 2023 +0000 1 diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e12f1e1 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,29 @@ +FROM debian:12 + +ENV DEBIAN_FRONTEND noninteractive + +RUN adduser qbittorrent-nox + +RUN apt update && apt install qbittorrent-nox supervisor -y \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + +RUN mkdir -p /var/log/supervisor && mkdir -p /home/qbittorrent-nox/Downloads/temp \ + && mkdir -p /home/qbittorent-nox/.config \ + && chown -R qbittorrent-nox:qbittorrent-nox /home/qbittorrent-nox + +COPY start-qbit.sh /start-qbit.sh + +RUN chmod +x /start-qbit.sh + +COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf + +VOLUME ["/home/qbittorent-nox/.config", "/home/qbittorent-nox/Downloads"] + +EXPOSE 8080/tcp + +EXPOSE 50000/tcp + +EXPOSE 50000/udp + +CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"] diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..abdb8e7 --- /dev/null +++ b/Makefile @@ -0,0 +1,11 @@ +all: + echo OK + +create-builder: + docker buildx create --use --platform=linux/arm64,linux/amd64,linux/arm/v7,linux/arm/v6 --name my_builder + docker buildx ls + docker buildx use my_builder +build: + docker login + docker buildx use my_builder + docker buildx build --platform linux/arm64,linux/amd64,linux/arm/v7,linux/arm/v6 -t elicro/qbittorrent-nox . --push diff --git a/start-qbit.sh b/start-qbit.sh new file mode 100755 index 0000000..1af4c46 --- /dev/null +++ b/start-qbit.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env sh + +cd ${HOME} +true | /usr/bin/qbittorrent-nox --webui-port=8080 diff --git a/supervisord.conf b/supervisord.conf new file mode 100644 index 0000000..da04f5b --- /dev/null +++ b/supervisord.conf @@ -0,0 +1,24 @@ +[unix_http_server] +file = /var/run/supervisord.sock + +[supervisord] +nodaemon=true +logfile=/dev/null +logfile_maxbytes=0 +user = root + +[program:qbittorrentNox] +user=qbittorrent-nox +minfds=10240 +minprocs=200 +umask=007 +command=/bin/sh /start-qbit.sh +directory=/home/qbittorrent-nox +startsecs=10 +autostart=true +autorestart=true +stdout_logfile=/dev/fd/1 +stdout_logfile_maxbytes=0 +redirect_stderr=true +startretries=1024 +environment=LANG=en_US.UTF-8,LC_ALL=en_US.UTF-8,HOME="/home/qbittorrent-nox",USER="qbittorrent-nox"