mirror of
https://github.com/MarkusMcNugen/docker-qBittorrentvpn
synced 2024-11-25 12:04:58 +00:00
Update Dockerfile
This commit is contained in:
parent
4e4e88d0a3
commit
9ec32a293c
64
Dockerfile
64
Dockerfile
@ -2,24 +2,66 @@
|
||||
#
|
||||
# Version 1.8
|
||||
|
||||
FROM ubuntu:18.04
|
||||
FROM alpine:3.7
|
||||
MAINTAINER MarkusMcNugen
|
||||
|
||||
VOLUME /downloads
|
||||
VOLUME /config
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
RUN usermod -u 99 nobody
|
||||
|
||||
# Update packages and install software
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends apt-utils \
|
||||
&& apt-get install -y software-properties-common \
|
||||
&& add-apt-repository ppa:qbittorrent-team/qbittorrent-stable \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y qbittorrent-nox openvpn curl moreutils net-tools dos2unix kmod iptables ipcalc \
|
||||
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
RUN echo "http://dl-4.alpinelinux.org/alpine/edge/community/" >> /etc/apk/repositories \
|
||||
&& echo "http://dl-4.alpinelinux.org/alpine/edge/testing/" >> /etc/apk/repositories \
|
||||
&& apk add --update bash openvpn iptables
|
||||
|
||||
RUN buildDeps=" \
|
||||
boost \
|
||||
boost-build \
|
||||
curl \
|
||||
g++ \
|
||||
gnutls-dev \
|
||||
gpgme \
|
||||
libev-dev \
|
||||
libnl3-dev \
|
||||
libseccomp-dev \
|
||||
linux-headers \
|
||||
linux-pam-dev \
|
||||
lz4-dev \
|
||||
make \
|
||||
readline-dev \
|
||||
tar \
|
||||
xz \
|
||||
"; \
|
||||
set -x \
|
||||
&& apk add --update --virtual .build-deps $buildDeps \
|
||||
&& export LIBTOR_VERSION=$(curl --silent "https://github.com/arvidn/libtorrent/tags" 2>&1 | grep -m 1 'libtorrent-' | sed -e 's~^[ \t]*~~;s~[ \t]*$~~' | sed -n 's/.*href="\([^"]*\).*/\1/p' | sed 's!.*/!!') \
|
||||
&& export QBIT_VERSION=$(curl --silent "https://github.com/qbittorrent/qBittorrent/tags" 2>&1 | grep -m 1 'release-' | sed -e 's~^[ \t]*~~;s~[ \t]*$~~' | sed -n 's/.*href="\([^"]*\).*/\1/p' | sed 's!.*/!!') \
|
||||
&& curl -L "https://github.com/arvidn/libtorrent/archive/$LIBTOR_VERSION.tar.gz" -o libtor.tar.gz \
|
||||
&& curl -L "https://github.com/qbittorrent/qBittorrent/archive/$QBIT_VERSION.tar.gz" -o qbittorrent.tar.gz \
|
||||
&& mkdir -p /usr/src/libtorrent \
|
||||
&& mkdir -p /usr/src/qbittorrent \
|
||||
&& tar -xzf libtor.tar.gz -C /usr/src/libtorrent --strip-components=1 \
|
||||
&& tar -xzf qbittorrent.tar.gz -C /usr/src/qbittorrent --strip-components=1 \
|
||||
&& rm libtor.tar.gz* \
|
||||
&& rm qbittorrent.tar.gz* \
|
||||
&& cd /usr/src/libtorrent/ \
|
||||
&& ./b2 install
|
||||
&& cd /usr/src/qbittorrent/ \
|
||||
&& ./configure --disable-gui \
|
||||
&& make -j$(nproc) \
|
||||
&& make install \
|
||||
&& cd / \
|
||||
&& rm -rf /usr/src/libtorrent \
|
||||
&& rm -rf /usr/src/qbittorrent \
|
||||
&& runDeps="$( \
|
||||
scanelf --needed --nobanner /usr/local/bin/qbittorrent-nox \
|
||||
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
|
||||
| xargs -r apk info --installed \
|
||||
| sort -u \
|
||||
)" \
|
||||
&& apk add --virtual .run-deps $runDeps gnutls-utils iptables \
|
||||
&& apk del .build-deps \
|
||||
&& rm -rf /var/cache/apk/*
|
||||
|
||||
# Add configuration and scripts
|
||||
ADD openvpn/ /etc/openvpn/
|
||||
|
Loading…
Reference in New Issue
Block a user