forked from domibarton/docker-sabnzbd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
66 lines (54 loc) · 1.68 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
FROM resin/rpi-raspbian:wheezy
MAINTAINER Dominique Barton
#
# Create user and group for SABnzbd.
#
RUN groupadd -r -g 666 sabnzbd \
&& useradd -r -u 666 -g 666 -d /sabnzbd sabnzbd
#
# Add SABnzbd init script.
#
ADD sabnzbd.sh /sabnzbd.sh
RUN chmod 755 /sabnzbd.sh
#
# Install SABnzbd and all required dependencies.
#
RUN export SABNZBD_VERSION=1.0.3 PAR2CMDLINE_VERSION=v0.6.14 \
&& sed -i "s/ main$/ main contrib non-free/" /etc/apt/sources.list \
&& apt-get -q update \
&& apt-get install -qy curl ca-certificates python-cheetah python-openssl python-yenc unzip p7zip-full build-essential automake \
&& curl -o /tmp/unrarsrc.tar.gz http://www.rarlab.com/rar/unrarsrc-5.4.2.tar.gz \
&& tar xzf /tmp/unrarsrc.tar.gz -C /tmp \
&& cd /tmp/unrar \
&& make -f makefile \
&& install -v -m755 unrar /usr/bin \
&& cd / \
&& curl -o /tmp/sabnzbd.tar.gz https://codeload.github.com/sabnzbd/sabnzbd/tar.gz/${SABNZBD_VERSION} \
&& tar xzf /tmp/sabnzbd.tar.gz \
&& mv sabnzbd-* sabnzbd \
&& chown -R sabnzbd: sabnzbd \
&& curl -o /tmp/par2cmdline.tar.gz https://codeload.github.com/Parchive/par2cmdline/tar.gz/${PAR2CMDLINE_VERSION} \
&& tar xzf /tmp/par2cmdline.tar.gz -C /tmp \
&& cd /tmp/par2cmdline-* \
&& aclocal \
&& automake --add-missing \
&& autoconf \
&& ./configure \
&& make \
&& make install \
&& apt-get -y remove curl build-essential automake \
&& apt-get -y autoremove \
&& apt-get -y clean \
&& rm -rf /var/lib/apt/lists/* \
&& cd / \
&& rm -rf /tmp/*
#
# Define container settings.
#
VOLUME ["/datadir", "/download"]
EXPOSE 8080
#
# Start SABnzbd.
#
WORKDIR /sabnzbd
CMD ["/sabnzbd.sh"]