forked from linuxserver/docker-sonarr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
51 lines (43 loc) · 1.2 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
FROM lsiobase/mono:xenial
# set version label
ARG BUILD_DATE
ARG VERSION
ARG SONARR_VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="sparklyballs"
# set environment variables
ARG DEBIAN_FRONTEND="noninteractive"
ENV XDG_CONFIG_HOME="/config/xdg"
ENV SONARR_BRANCH="master"
LABEL Name="Sonarr"
# add mediainfo repo
ADD . /tmp
# add sonarr repository
RUN \
echo "**** install packages ****" && \
apt-get update && \
apt-get install -y \
jq && \
echo "**** install sonarr ****" && \
mkdir -p /opt/NzbDrone && \
if [ -z ${SONARR_VERSION+x} ]; then \
SONARR_VERSION=$(curl -sX GET https://services.sonarr.tv/v1/download/${SONARR_BRANCH} \
| jq -r '.version'); \
fi && \
curl -o \
/tmp/sonarr.tar.gz -L \
"https://download.sonarr.tv/v2/${SONARR_BRANCH}/mono/NzbDrone.${SONARR_BRANCH}.${SONARR_VERSION}.mono.tar.gz" && \
tar xf \
/tmp/sonarr.tar.gz -C \
/opt/NzbDrone --strip-components=1 && \
echo "**** cleanup ****" && \
apt-get clean && \
rm -rf \
/tmp/* \
/var/tmp/*
# add local files
COPY root/ /
# ports and volumes
EXPOSE 8080
VOLUME /config
HEALTHCHECK --interval=200s --timeout=100s CMD curl --fail http://localhost:8080 || exit 1