From ef3773228f7a6144327c3f724629863b71e49f3b Mon Sep 17 00:00:00 2001 From: DyonR Date: Sun, 30 Aug 2020 03:36:08 +0200 Subject: [PATCH] Revert "Merge branch 'alpha' into dev" This reverts commit 7bfd725166c7107600612f6d0a4e41ed72e46231, reversing changes made to b58ac335054aeba5863eafbaa5296965ef619ea2. --- Dockerfile | 134 +++++++++++++++++++++++++++++++++-------------------- README.md | 2 +- 2 files changed, 85 insertions(+), 51 deletions(-) diff --git a/Dockerfile b/Dockerfile index f602561..f3f418c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,61 +7,35 @@ RUN usermod -u 99 nobody # Make directories RUN mkdir -p /downloads /config/qBittorrent /etc/openvpn /etc/qbittorrent +# Compile libtorrent-rasterbar RUN apt update \ && apt -y upgrade \ && apt -y install --no-install-recommends \ - curl \ - jq \ - build-essential \ ca-certificates \ - pkg-config \ - automake \ - libtool \ - git \ - zlib1g-dev \ - libssl-dev \ - libgeoip-dev \ - libboost-dev \ + curl \ + g++ \ + jq \ libboost-system-dev \ - libboost-chrono-dev \ - libboost-random-dev \ - python3 \ - qtbase5-dev \ - qttools5-dev \ - libqt5svg5-dev \ + libssl-dev \ + make \ && LIBTORRENT_ASSETS=$(curl -sX GET "https://api.github.com/repos/arvidn/libtorrent/releases" | jq '.[0] .assets_url' | tr -d '"') \ && LIBTORRENT_DOWNLOAD_URL=$(curl -sX GET ${LIBTORRENT_ASSETS} | jq '.[0] .browser_download_url' | tr -d '"') \ && LIBTORRENT_NAME=$(curl -sX GET ${LIBTORRENT_ASSETS} | jq '.[0] .name' | tr -d '"') \ && curl -o /opt/${LIBTORRENT_NAME} -L ${LIBTORRENT_DOWNLOAD_URL} \ - && tar -xvzf /opt/${LIBTORRENT_NAME} \ - && rm /opt/*.tar.gz \ + && tar -xzf /opt/${LIBTORRENT_NAME} \ + && rm /opt/${LIBTORRENT_NAME} \ && cd /opt/libtorrent-rasterbar* \ && ./configure --disable-debug --enable-encryption && make clean && make -j$(nproc) && make install \ - && git clone https://github.com/qbittorrent/qBittorrent.git /opt/qBittorrent \ - && cd /opt/qBittorrent \ - && ./configure --disable-gui && make -j$(nproc) && make install \ && cd /opt \ && rm -rf /opt/* \ && apt -y purge \ - curl \ - jq \ - build-essential \ ca-certificates \ - pkg-config \ - automake \ - libtool \ - git \ - zlib1g-dev \ - libssl-dev \ - libgeoip-dev \ - libboost-dev \ + curl \ + g++ \ + jq \ libboost-system-dev \ - libboost-chrono-dev \ - libboost-random-dev \ - python3 \ - qtbase5-dev \ - qttools5-dev \ - libqt5svg5-dev \ + libssl-dev \ + make \ && apt-get clean \ && apt -y autoremove \ && rm -rf \ @@ -69,26 +43,86 @@ RUN apt update \ /tmp/* \ /var/tmp/* +# Compile qBittorrent +RUN apt update \ + && apt -y upgrade \ + && apt -y install --no-install-recommends \ + ca-certificates \ + curl \ + g++ \ + jq \ + libboost-system-dev \ + libssl-dev \ + make \ + pkg-config \ + qtbase5-dev \ + qttools5-dev \ + zlib1g-dev \ + && QBITTORRENT_RELEASE=$(curl -sX GET "https://api.github.com/repos/qBittorrent/qBittorrent/tags" | jq '.[0] .name' | tr -d '"') \ + && curl -o /opt/qBittorrent-${QBITTORRENT_RELEASE}.tar.gz -L "https://github.com/qbittorrent/qBittorrent/archive/${QBITTORRENT_RELEASE}.tar.gz" \ + && tar -xzf /opt/qBittorrent-${QBITTORRENT_RELEASE}.tar.gz \ + && rm /opt/qBittorrent-${QBITTORRENT_RELEASE}.tar.gz \ + && cd /opt/qBittorrent-${QBITTORRENT_RELEASE} \ + && ./configure --disable-gui && make -j$(nproc) && make install \ + && cd /opt \ + && rm -rf /opt/* \ + && apt -y purge \ + ca-certificates \ + curl \ + g++ \ + jq \ + libboost-system-dev \ + libssl-dev \ + make \ + pkg-config \ + qtbase5-dev \ + qttools5-dev \ + zlib1g-dev \ + && apt-get clean \ + && apt -y autoremove \ + && rm -rf \ + /var/lib/apt/lists/* \ + /tmp/* \ + /var/tmp/* + +# Install WireGuard, OpenVPN and other dependencies for running qbittorrent-nox and the container scripts RUN echo "deb http://deb.debian.org/debian/ unstable main" > /etc/apt/sources.list.d/unstable-wireguard.list \ && printf 'Package: *\nPin: release a=unstable\nPin-Priority: 150\n' > /etc/apt/preferences.d/limit-unstable \ && apt update \ && apt -y install --no-install-recommends \ - libboost-system1.67.0 \ - libqt5xml5 \ - libqt5network5 \ - libssl1.1 \ - kmod \ - iptables \ + ca-certificates \ + curl \ + dos2unix \ inetutils-ping \ - procps \ + ipcalc \ + iptables \ + kmod \ + libboost-system1.67.0 \ + libqt5network5 \ + libqt5xml5 \ + libssl1.1 \ moreutils \ net-tools \ - dos2unix \ - openvpn \ openresolv \ + openvpn \ + procps \ wireguard-tools \ - ipcalc \ - ca-certificates \ + && apt-get clean \ + && apt -y autoremove \ + && rm -rf \ + /var/lib/apt/lists/* \ + /tmp/* \ + /var/tmp/* + +RUN echo "deb http://deb.debian.org/debian/ buster non-free" > /etc/apt/sources.list.d/non-free-unrar.list \ + && printf 'Package: *\nPin: release a=non-free\nPin-Priority: 150\n' > /etc/apt/preferences.d/limit-non-free \ + && apt update \ + && apt -y upgrade \ + && apt -y install --no-install-recommends \ + unrar \ + p7zip-full \ + unzip \ + zip \ && apt-get clean \ && apt -y autoremove \ && rm -rf \ diff --git a/README.md b/README.md index 84ff304..128a562 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # [qBittorrent](https://github.com/qbittorrent/qBittorrent), WireGuard and OpenVPN [![Docker Pulls](https://img.shields.io/docker/pulls/dyonr/qbittorrentvpn)](https://hub.docker.com/r/dyonr/qbittorrentvpn) -[![Docker Image Size (tag)](https://img.shields.io/docker/image-size/dyonr/qbittorrentvpn/alpha)](https://hub.docker.com/r/dyonr/qbittorrentvpn) +[![Docker Image Size (tag)](https://img.shields.io/docker/image-size/dyonr/qbittorrentvpn/latest)](https://hub.docker.com/r/dyonr/qbittorrentvpn) Docker container which runs the latest [qBittorrent](https://github.com/qbittorrent/qBittorrent)-nox client while connecting to WireGuard (experimental) or OpenVPN with iptables killswitch to prevent IP leakage when the tunnel goes down.