From ceff2bead5998b37a1d4e681429f166c673aa8be Mon Sep 17 00:00:00 2001 From: Odmin Date: Wed, 20 Nov 2019 17:31:45 +0300 Subject: [PATCH] qbittorrent --- _experemental/qbittorrent/latest/Dockerfile | 15 +++++-- _experemental/qbittorrent/latest/Makefile | 6 ++- .../qbittorrent/latest/docker-compose.yml | 23 ++++++++++ .../qbittorrent/latest/entrypoint.sh | 27 ++++++++++++ _experemental/qbittorrent/stable/Dockerfile | 44 ------------------- .../qbittorrent/stable/entrypoint.sh | 27 ++++++++++++ .../qbittorrent/stable/will_be_later | 1 + 7 files changed, 94 insertions(+), 49 deletions(-) create mode 100644 _experemental/qbittorrent/latest/docker-compose.yml create mode 100755 _experemental/qbittorrent/latest/entrypoint.sh delete mode 100644 _experemental/qbittorrent/stable/Dockerfile create mode 100755 _experemental/qbittorrent/stable/entrypoint.sh create mode 100644 _experemental/qbittorrent/stable/will_be_later diff --git a/_experemental/qbittorrent/latest/Dockerfile b/_experemental/qbittorrent/latest/Dockerfile index 9a7662522..ab95676af 100644 --- a/_experemental/qbittorrent/latest/Dockerfile +++ b/_experemental/qbittorrent/latest/Dockerfile @@ -7,11 +7,12 @@ ARG DEBIAN_FRONTEND=noninteractive ################################################################## ENV BuildDocker true ARG SBM_DIR=/mnt/smb +ARG QBT_DIR=/opt/qbittorrent ################################################################## # Files and folders ################################################################## -RUN mkdir -p ${SMB_DIR} +RUN mkdir -p ${SMB_DIR} ${QBT_DIR} ################################################################## # qBitTorrent sources list @@ -25,14 +26,16 @@ RUN apt autoremove -y && apt update && apt dist-upgrade -y ################################################################## RUN apt-get update && \ apt install -y --allow-unauthenticated --allow-downgrades \ - qbittorrent \ + qbittorrent-nox \ + ntfs-3g \ + winbind \ cifs-utils ################################################################## # other customisations ################################################################## -RUN cat /etc/samba/smb.conf + ################################################################## # cleaninig up @@ -41,3 +44,9 @@ RUN apt clean -y && \ apt autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ rm -rfv /var/cache/apt/archives/*.deb + +VOLUME ${QBT_DIR} + +EXPOSE 8080 + +ENTRYPOINT /entrypoint.sh \ No newline at end of file diff --git a/_experemental/qbittorrent/latest/Makefile b/_experemental/qbittorrent/latest/Makefile index b531b0d4b..2817a6db4 100644 --- a/_experemental/qbittorrent/latest/Makefile +++ b/_experemental/qbittorrent/latest/Makefile @@ -1,4 +1,6 @@ all: emgqb emgqb: - docker build --compress -t epicmorg/qbittorrent . - + docker build --compress -t epicmorg/qbittorrent:latest . + docker push epicmorg/qbittorrent:latest + docker build --compress -t epicmorg/qbittorrent:unstable . + docker push epicmorg/qbittorrent:unstable diff --git a/_experemental/qbittorrent/latest/docker-compose.yml b/_experemental/qbittorrent/latest/docker-compose.yml new file mode 100644 index 000000000..43e126daf --- /dev/null +++ b/_experemental/qbittorrent/latest/docker-compose.yml @@ -0,0 +1,23 @@ +version: '3.7' +services: + qbittorrent: + image: epicmorg/qbittorrent:latest + restart: always + container_name: qbittorrent + ports: + - "0.0.0.0:8080:8080" + volumes: + - /etc/localtime:/etc/localtime + - /etc/timezone:/etc/timezone + - /etc/letsencrypt:/etc/letsencrypt + - /opt/qbittorrent/profiles:/opt/qbittorrent/profiles + tmpfs: + - /tmp + environment: + - QBT_PROFILE_NAME=docker + - SMB_ENABLED=true + - SMB_IP=10.10.10.10 + - SMB_USER=admin + - SMB_PASS=password + - SMB_WORKGROUP=WORKGROUP + - SMB_BIND=/remote/folder diff --git a/_experemental/qbittorrent/latest/entrypoint.sh b/_experemental/qbittorrent/latest/entrypoint.sh new file mode 100755 index 000000000..34539d071 --- /dev/null +++ b/_experemental/qbittorrent/latest/entrypoint.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +: ${QBT_PROFILES_DIR:=/opt/qbittorrent/profiles} +: ${QBT_PROFILE_NAME:=docker} + +: ${SMB_ENABLED:=false} + +: ${SMB_DIR:=/mnt/smb} +: ${SMB_IP:=10.10.10.10} +: ${SMB_USER:=admin} +: ${SMB_PASS:=password} +: ${SMB_WORKGROUP:=WORKGROUP} +: ${SMB_BIND:=/remote/folder} + +#mounting +case $SMB_ENABLED in + true) + echo "SMB Mount enabled - trying to mount" + mount.cifs //${SMB_IP}${{SMB_BIND} ${SMB_DIR} -o username=${SMB_USER},password=${SMB_PASS},domain=${SMB_WORKGROUP},iocharset=utf8,file_mode=0777,dir_mode=0777,noperm,mapchars + ;; + false) + echo "SMD Disabled - skipping" + ;; +esac + +#starting torrent +qbittorrent-nox --profile=${QBT_PROFILES_DIR} --configuration=${QBT_PROFILE_NAME} --webui-port=8080 \ No newline at end of file diff --git a/_experemental/qbittorrent/stable/Dockerfile b/_experemental/qbittorrent/stable/Dockerfile deleted file mode 100644 index f011bf73b..000000000 --- a/_experemental/qbittorrent/stable/Dockerfile +++ /dev/null @@ -1,44 +0,0 @@ -FROM epicmorg/devel -LABEL maintainer="EpicMorg DevTeam, developer@epicm.org" -ARG DEBIAN_FRONTEND=noninteractive - -################################################################## -# ARGuments -################################################################## -#ENV BuildDocker true -#ARG BUILDS_DIR=/builds -#ARG SRC_DIR=${BUILDS_DIR}/src -#ARG EXPORT_DIR=${BUILDS_DIR}/export - -################################################################## -# Files and folders -################################################################## -#RUN mkdir -p ${SRC_DIR} ${EXPORT_DIR} ${PRE_DIR} - -################################################################## -# qBitTorrent sources list -################################################################## -RUN apt-key adv --recv-keys --keyserver keyserver.ubuntu.com D35164147CA69FC4 -COPY qbittorrent-stable.list /etc/apt/sources.list.d/qbittorrent-stable.list -RUN apt autoremove -y && apt update && apt dist-upgrade -y - -############################# #################################### -# qbittorrent install -################################################################## -RUN apt-get update && \ - apt install -y --allow-unauthenticated --allow-downgrades \ - qbittorrent \ - cifs-utils - -################################################################## -# other customisations -################################################################## -RUN cat /etc/samba/smb.conf - -################################################################## -# cleaninig up -################################################################## -RUN apt clean -y && \ - apt autoclean -y && \ - rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb diff --git a/_experemental/qbittorrent/stable/entrypoint.sh b/_experemental/qbittorrent/stable/entrypoint.sh new file mode 100755 index 000000000..34539d071 --- /dev/null +++ b/_experemental/qbittorrent/stable/entrypoint.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +: ${QBT_PROFILES_DIR:=/opt/qbittorrent/profiles} +: ${QBT_PROFILE_NAME:=docker} + +: ${SMB_ENABLED:=false} + +: ${SMB_DIR:=/mnt/smb} +: ${SMB_IP:=10.10.10.10} +: ${SMB_USER:=admin} +: ${SMB_PASS:=password} +: ${SMB_WORKGROUP:=WORKGROUP} +: ${SMB_BIND:=/remote/folder} + +#mounting +case $SMB_ENABLED in + true) + echo "SMB Mount enabled - trying to mount" + mount.cifs //${SMB_IP}${{SMB_BIND} ${SMB_DIR} -o username=${SMB_USER},password=${SMB_PASS},domain=${SMB_WORKGROUP},iocharset=utf8,file_mode=0777,dir_mode=0777,noperm,mapchars + ;; + false) + echo "SMD Disabled - skipping" + ;; +esac + +#starting torrent +qbittorrent-nox --profile=${QBT_PROFILES_DIR} --configuration=${QBT_PROFILE_NAME} --webui-port=8080 \ No newline at end of file diff --git a/_experemental/qbittorrent/stable/will_be_later b/_experemental/qbittorrent/stable/will_be_later new file mode 100644 index 000000000..8d1c8b69c --- /dev/null +++ b/_experemental/qbittorrent/stable/will_be_later @@ -0,0 +1 @@ +