3.11.6 #1

Merged
jonny merged 13 commits from 3.11.6 into master 2020-07-11 06:47:15 +00:00
3 changed files with 74 additions and 0 deletions

42
Dockerfile Normal file
View File

@ -0,0 +1,42 @@
# Base on latest (edge) alpine image
FROM harbor.ervine.dev/library/x86_64/alpine/alpine-3.11
MAINTAINER “Jonathan Ervine” <docker@ervine.org>
# Install updates
ENV LANG='en_US.UTF-8' \
LANGUAGE='en_US.UTF-8' \
TERM='xterm' \
VERSION='develop' \
SONARR_USER='mediaservice' \
SONARR_GROUP='mediaservice' \
SONARR_UID='1003' \
SONARR_GID='1003'
RUN echo http://dl-4.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories && \
apk -U update && \
apk -U upgrade && \
apk -U add \
libmediainfo \
ca-certificates \
mono \
&& \
apk del make gcc g++ && \
rm -rf /tmp/src && \
rm -rf /var/cache/apk/*
ADD start.sh /usr/local/bin/start.sh
RUN chmod 755 /usr/local/bin/start.sh
RUN wget https://update.sonarr.tv/v2/master/mono/NzbDrone.master.tar.gz -O nzbdrone.tar.gz && \
tar zxvf nzbdrone.tar.gz && \
rm -rf nzbdrone.tar.gz && \
addgroup -g $SONARR_GID $SONARR_GROUP && \
adduser -D -u $SONARR_UID -G $SONARR_GROUP -H $SONARR_USER && \
chown -R $SONARR_USER:$SONARR_GROUP /NzbDrone
EXPOSE 8989
USER $SONARR_USER
CMD [ "/usr/local/bin/start.sh" ]

26
Jenkinsfile vendored Normal file
View File

@ -0,0 +1,26 @@
node("docker-node") {
docker.withRegistry('https://harbor.ervine.dev', 'jenkins-to-harbor') {
git branch: "3.11.6", url: "ssh://git@git.ervine.org/jonny/x86_64-alpine-sonarr", credentialsId: 'jenkins-to-git'
sh "git rev-parse HEAD > .git/commit-id"
def commit_id = readFile('.git/commit-id').trim()
println commit_id
try {
stage "build"
def app = docker.build "library/x86_64/alpine/sonarr"
stage "publish"
app.push("v2.0.0.5344")
app.push("v2")
stage('Deploy on K8s'){
sh "/usr/local/bin/kubectl -n media delete po sonarr-0"
}
}
catch (err) {
currentBuild.result = 'FAILURE'
}
}
}

6
start.sh Normal file
View File

@ -0,0 +1,6 @@
#!/bin/sh
##
## Script to start the sonarr server
##
until [ -f "/config/nzbdrone.db" ]; do sleep 1; done
/usr/bin/mono --debug /NzbDrone/NzbDrone.exe --nobrowser --data=/config