diff --git a/Dockerfile b/Dockerfile index 8f1dc81..2be2eda 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Base on latest (edge) alpine image -FROM harbor.ervine.dev/library/x86_64/alpine/alpine-3.11 +FROM harbor.ervine.dev/public/x86_64/alpine:v3.12 MAINTAINER “Jonathan Ervine” @@ -7,7 +7,11 @@ MAINTAINER “Jonathan Ervine” ENV LANG='en_US.UTF-8' \ LANGUAGE='en_US.UTF-8' \ TERM='xterm' \ - VERSION='2.25.0' + VERSION='2.25.0' \ + HYDRA_USER=hydra \ + HYDRA_UID=1003 \ + HYDRA_GID=1003 + RUN echo http://dl-4.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories && \ apk update && \ @@ -18,10 +22,12 @@ RUN wget https://github.com/theotherp/nzbhydra2/releases/download/v$VERSION/nzbh mkdir /nzbhydra && \ unzip /nzbhydra.zip -d /nzbhydra && \ chmod 755 /nzbhydra/nzbhydra2 && \ - rm -rf /nzbhydra.zip /tmp/src /var/cache/apk/* + rm -rf /nzbhydra.zip /tmp/src /var/cache/apk/* && \ + addgroup -g $HYDRA_GID $HYDRA_USER && \ + adduser -D -u $HYDRA_UID -G $HYDRA_USER -H $HYDRA_USER EXPOSE 5076 -COPY start.sh /usr/local/bin/start.sh VOLUME /config +WORKDIR /nzbhydra -CMD [ "/usr/local/bin/start.sh" ] +CMD [ "/usr/bin/python3", "nzbhydra2wrapperPy3.py", "--nobrowser", "--datafolder=/config/" ] diff --git a/Jenkinsfile b/Jenkinsfile index 37229b4..82df167 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -28,7 +28,7 @@ spec: stage('Build with Kaniko') { git url: 'ssh://git@git.ervine.org/jonny/x86_64-alpine-nzbhydra.git', credentialsId: 'jenkins-to-git' container('kaniko') { - sh '/kaniko/executor -f `pwd`/Dockerfile -c `pwd` --cache=true --destination=harbor.ervine.dev/library/x86_64/alpine/nzbhydra2:2.25.0 --destination=harbor.ervine.dev/library/x86_64/alpine/nzbhydra2:2.25 --destination=harbor.ervine.dev/library/x86_64/alpine/nzbget2:2' + sh '/kaniko/executor -f `pwd`/Dockerfile -c `pwd` --cache=false --destination=harbor.ervine.dev/library/x86_64/alpine/nzbhydra2:2.25.0 --destination=harbor.ervine.dev/library/x86_64/alpine/nzbhydra2:2.25 --destination=harbor.ervine.dev/library/x86_64/alpine/nzbget2:2 --destination=harbor.ervine.dev/public/x86_64/alpine/nzbhydra2:v2.25.0 --destination=harbor.ervine.dev/public/x86_64/alpine/nzbhydra2:v2.25' } } } diff --git a/hydra.png b/hydra.png new file mode 100644 index 0000000..2e9fe74 Binary files /dev/null and b/hydra.png differ