Files
sonarr/Dockerfile
Jameel Al-Aziz 5a25387b77 Remove downloads and tv volumes from Dockerfile
Specifying the volumes in the Dockerfile is unnecessary and can lead to
excessive orphaned volume if the user chooses to use different paths at
runtime.
2019-11-02 21:59:15 -07:00

44 lines
1.0 KiB
Docker

FROM lsiobase/mono:LTS
# 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="develop"
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 8989
VOLUME /config