-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
128 lines (118 loc) · 4.36 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
FROM ubuntu:lunar
# version args
ARG SHORT_TAG_VER
ARG FULL_TAG_VER
ARG QBITTORRENT_VER
ARG FILEBOT_VER
# version args for s6 overlay
ARG S6_OVERLAY_VER
ARG S6_OVERLAY_ARCH="x86_64"
ARG VUETORRENT_VER
ARG MEDIAINFO_REPO_VER="1.0-24"
LABEL org.opencontainers.image.version="${SHORT_TAG_VER}"
LABEL org.opencontainers.image.tag.version="${FULL_TAG_VER}"
LABEL org.opencontainers.image.qbittorrent.version="${QBITTORRENT_VER}"
LABEL org.opencontainers.image.filebot.version="${FILEBOT_VER}"
LABEL org.opencontainers.image.s6-overlay.version="${S6_OVERLAY_VER}"
LABEL org.opencontainers.image.vuetorrent.version="${VUETORRENT_VER}"
LABEL maintainer="devster31"
# environment settings
ENV HOME="/config" \
XDG_CONFIG_HOME="/config" \
XDG_DATA_HOME="/config" \
QBITTORRENT_VER="${QBITTORRENT_VER}" \
FILEBOT_VER="${FILEBOT_VER}" \
S6_OVERLAY_VER="${S6_OVERLAY_VER}" \
VUETORRENT_VER="${VUETORRENT_VER}" \
MEDIAINFO_REPO_VER="${MEDIAINFO_REPO_VER}" \
PATH="/command:$PATH"
# add repo and install qbitorrent
RUN export DEBIAN_FRONTEND=noninteractive && \
export DEBCONF_NONINTERACTIVE_SEEN=true && \
echo "tzdata tzdata/Areas select Etc" | debconf-set-selections && \
echo "tzdata tzdata/Zones/Etc select UTC" | debconf-set-selections && \
apt-get update -q && \
apt-get install -q -y --no-install-recommends \
apt-transport-https \
apt-utils \
curl \
file \
gnupg \
jq \
libchromaprint-tools \
libjna-jni \
default-jre-headless \
p7zip-full \
p7zip-rar \
software-properties-common \
unrar \
unzip \
xz-utils \
&& \
echo "***** add mediainfo repositories ****" && \
cd /tmp && \
curl -sSL -OJ "https://mediaarea.net/repo/deb/repo-mediaarea-snapshots_${MEDIAINFO_REPO_VER}_all.deb" && \
dpkg -i "repo-mediaarea-snapshots_${MEDIAINFO_REPO_VER}_all.deb" && \
echo "***** install mediainfo ****" && \
apt-get update -q && \
apt-get install -q -y --no-install-recommends \
libmediainfo0v5 \
&& \
echo "***** add qbitorrent repositories ****" && \
apt-key adv --keyserver hkp://keyserver.ubuntu.com:11371 --recv-keys 7CA69FC4 && \
apt-add-repository -y -u "http://ppa.launchpad.net/qbittorrent-team/qbittorrent-stable/ubuntu main" && \
echo "**** install qBittorrent ****" && \
DEBIAN_FRONTEND=noninteractive \
apt-get install -q -y --no-install-recommends \
qbittorrent-nox="${QBITTORRENT_VER}" \
&& \
echo "**** add FileBot repository ****" && \
apt-key adv --fetch-keys https://raw.githubusercontent.com/filebot/plugins/master/gpg/maintainer.pub && \
echo "deb [arch=amd64] https://get.filebot.net/deb/ stable main" > /etc/apt/sources.list.d/filebot.list && \
apt-get update -q && \
echo "**** install FileBot package ****" && \
DEBIAN_FRONTEND=noninteractive \
apt-get install -q -y --no-install-recommends \
filebot="${FILEBOT_VER}" \
&& \
echo "**** cleanup ****" && \
apt-get -y autoremove && \
apt-get -y clean && \
rm -rf \
/var/lib/apt/lists/* \
/var/tmp/* \
/tmp/*
RUN \
echo "**** add s6 overlay ****" && \
curl -sSL -o \
/tmp/s6-overlay-noarch.tar.xz \
"https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VER}/s6-overlay-noarch.tar.xz" && \
tar -xJpv -f \
/tmp/s6-overlay-noarch.tar.xz -C / && \
curl -sSL -o \
/tmp/s6-overlay.tar.xz \
"https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VER}/s6-overlay-${S6_OVERLAY_ARCH}.tar.xz" && \
tar -xJpv -f \
/tmp/s6-overlay.tar.xz -C / && \
echo "**** add VueTorrent ****" && \
curl -sSL -o \
/tmp/vuetorrent.zip \
"https://github.com/WDaan/VueTorrent/releases/download/v${VUETORRENT_VER}/vuetorrent.zip" && \
unzip -d /app /tmp/vuetorrent.zip && \
echo "**** create abc user ****" && \
# add group users
groupmod -g 100 users && \
# add abc user without shell
useradd -u 911 -U -d /config -m -s /bin/false abc && \
# assign users group to abc user
usermod -G users abc && \
rm -rf \
/tmp/*
ENV LANG C.UTF-8
ENV FILEBOT_OPTS "-Dapplication.deployment=docker"
# copy local files
COPY root/ /
# ports and volumes
EXPOSE 6881 6881/udp 8080
VOLUME /config
ENTRYPOINT ["/init"]