forked from sohrab-/docker-qbittorrent
-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathDockerfile
89 lines (74 loc) · 2.57 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
FROM debian:jessie
MAINTAINER Werner Beroux <werner@beroux.com>
RUN echo "Install dependencies" \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
cmake \
curl \
g++ \
libboost-system-dev \
libqt4-dev \
libssl-dev \
make \
pkg-config \
qtbase5-dev \
libboost-system1.55.0 \
libc6 \
libgcc1 \
libqt4-network \
libqt5network5 \
libqt5widgets5 \
libqtcore4 \
libstdc++6 \
zlib1g \
&& echo "Download qBittorrent source code" \
&& LIBTORRENT_RASTERBAR_URL=https://github.com/arvidn/libtorrent/releases/download/libtorrent-1_0_7/libtorrent-rasterbar-1.0.7.tar.gz \
&& QBITTORRENT_URL=http://sourceforge.net/projects/qbittorrent/files/qbittorrent/qbittorrent-3.3.1/qbittorrent-3.3.1.tar.gz/download \
&& mkdir -p /tmp/libtorrent-rasterbar \
&& mkdir -p /tmp/qbittorrent \
&& curl -L $LIBTORRENT_RASTERBAR_URL | tar xzC /tmp/libtorrent-rasterbar --strip-components=1 \
&& curl -L $QBITTORRENT_URL | tar xzC /tmp/qbittorrent --strip-components=1 \
&& echo "Build and install" \
&& cd /tmp/libtorrent-rasterbar \
&& mkdir build \
&& cd build \
&& cmake .. \
&& make install \
&& cd /tmp/qbittorrent \
&& ./configure --disable-gui \
&& make install \
&& echo "Clean-up" \
&& apt-get purge --auto-remove -y \
cmake \
curl \
g++ \
libboost-system-dev \
libssl-dev \
make \
pkg-config \
libqt4-dev \
qtbase5-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& echo "Create symbolic links to simplify mounting" \
&& useradd --system --uid 520 -m --shell /usr/sbin/nologin qbittorrent \
&& mkdir -p /home/qbittorrent/.config/qBittorrent \
&& chown qbittorrent:qbittorrent /home/qbittorrent/.config/qBittorrent \
&& ln -s /home/qbittorrent/.config/qBittorrent /config \
&& mkdir -p /home/qbittorrent/.local/share/data/qBittorrent \
&& chown qbittorrent:qbittorrent /home/qbittorrent/.local/share/data/qBittorrent \
&& ln -s /home/qbittorrent/.local/share/data/qBittorrent /torrents \
&& mkdir /downloads \
&& chown qbittorrent:qbittorrent /downloads
# Default configuration file.
ADD qBittorrent.conf /default/qBittorrent.conf
ADD entrypoint.sh /
VOLUME /config
VOLUME /torrents
VOLUME /downloads
EXPOSE 8080
EXPOSE 6881
USER qbittorrent
ENTRYPOINT ["/entrypoint.sh"]
CMD ["qbittorrent-nox"]