This commit is contained in:
Eliezer Croitoru 2023-12-23 11:26:15 +00:00
commit b12f421298
4 changed files with 68 additions and 0 deletions

29
Dockerfile Normal file
View File

@ -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"]

11
Makefile Normal file
View File

@ -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

4
start-qbit.sh Executable file
View File

@ -0,0 +1,4 @@
#!/usr/bin/env sh
cd ${HOME}
true | /usr/bin/qbittorrent-nox --webui-port=8080

24
supervisord.conf Normal file
View File

@ -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"