mirror of
https://github.com/jessfraz/dockerfiles.git
synced 2025-12-08 06:21:32 +01:00
add sonarr and radarr
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
This commit is contained in:
34
sonarr/Dockerfile
Normal file
34
sonarr/Dockerfile
Normal file
@@ -0,0 +1,34 @@
|
||||
FROM alpine:latest
|
||||
LABEL maintainer "Jessie Frazelle <jess@linux.com>"
|
||||
|
||||
ENV LANG "en_US.UTF-8"
|
||||
ENV LANGUAGE "en_US.UTF-8"
|
||||
ENV TERM "xterm"
|
||||
|
||||
RUN apk add --no-cache \
|
||||
bash \
|
||||
ca-certificates \
|
||||
libmediainfo \
|
||||
mono \
|
||||
tar \
|
||||
--repository https://dl-4.alpinelinux.org/alpine/edge/testing
|
||||
|
||||
ENV SONARR_VERSION "develop"
|
||||
RUN mkdir -p /opt/sonarr \
|
||||
&& wget "http://update.sonarr.tv/v2/${SONARR_VERSION}/mono/NzbDrone.${SONARR_VERSION}.tar.gz" -O /tmp/sonarr.tar.gz \
|
||||
&& tar -xzvf /tmp/sonarr.tar.gz -C /opt/sonarr --strip-components 1 \
|
||||
&& rm -rf /tmp/sonarr.tar.gz
|
||||
|
||||
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
|
||||
|
||||
# Create user and change ownership
|
||||
RUN addgroup -g 666 -S sonarr \
|
||||
&& adduser -u 666 -SHG sonarr sonarr \
|
||||
&& mkdir -p /config \
|
||||
&& chown -R sonarr:sonarr /opt/sonarr /config
|
||||
|
||||
WORKDIR /opt/sonarr
|
||||
|
||||
USER sonarr
|
||||
|
||||
ENTRYPOINT ["entrypoint.sh"]
|
||||
15
sonarr/entrypoint.sh
Executable file
15
sonarr/entrypoint.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
handle_signal() {
|
||||
PID=$!
|
||||
echo "Received signal. PID is ${PID}"
|
||||
kill -s SIGHUP $PID
|
||||
}
|
||||
|
||||
trap "handle_signal" SIGINT SIGTERM SIGHUP
|
||||
|
||||
echo "Starting sonarr..."
|
||||
exec mono --debug /opt/sonarr/NzbDrone.exe --no-browser -data=/config & wait
|
||||
echo "Stopping sonarr..."
|
||||
Reference in New Issue
Block a user