From 951900a7145cfac809da46d3a37bd38e3a3eebcb Mon Sep 17 00:00:00 2001 From: jonny Date: Thu, 4 Mar 2021 16:04:49 +0000 Subject: [PATCH] 'update files with ansible' --- Dockerfile | 19 +++++++------------ Jenkinsfile | 6 +++--- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/Dockerfile b/Dockerfile index caed4b1..3582874 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,27 +6,22 @@ MAINTAINER “Jonathan Ervine” # Install updates ENV LANG='en_US.UTF-8' \ LANGUAGE='en_US.UTF-8' \ - TERM='xterm' \ - VERSION='3.13.0' \ - HYDRA_USER=hydra \ - MYNAME=jonny \ - HYDRA_UID=1027 \ - HYDRA_GID=1027 - + TERM='xterm' RUN echo http://dl-4.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories && \ apk update && \ apk -U upgrade --ignore alpine-baselayout && \ apk -U add unzip python3 -RUN wget https://github.com/theotherp/nzbhydra2/releases/download/v$VERSION/nzbhydra2-$VERSION-linux.zip -O nzbhydra.zip && \ +RUN wget https://github.com/theotherp/nzbhydra2/releases/download/v3.13.0/nzbhydra2-3.13.0-linux.zip -O hydra.zip && \ mkdir /nzbhydra && \ - unzip /nzbhydra.zip -d /nzbhydra && \ + unzip /hydra.zip -d /nzbhydra && \ chmod 755 /nzbhydra/nzbhydra2 && \ - 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 + rm -rf /hydra.zip /tmp/src /var/cache/apk/* && \ + addgroup -g 1027 hydra && \ + adduser -D -u 1027 -G hydra -H hydra +USER hydra EXPOSE 5076 VOLUME /config WORKDIR /nzbhydra diff --git a/Jenkinsfile b/Jenkinsfile index 48c593a..cb5d352 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,10 +1,10 @@ - +--- podTemplate(yaml: """ kind: Pod spec: containers: - name: kaniko - image: gcr.io/kaniko-project/executor:debug-539ddefcae3fd6b411a95982a830d987f4214251 + image: gcr.io/kaniko-project/executor:debug imagePullPolicy: Always command: - /busybox/cat @@ -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=false --destination=harbor.ervine.dev/public/x86_64/alpine/nzbhydra2:v3.13.0 --destination=harbor.ervine.dev/public/x86_64/alpine/nzbhydra2:v3.13' + sh '/kaniko/executor -f `pwd`/Dockerfile -c `pwd` --cache=false --destination=harbor.ervine.dev/public/x86_64/alpine//nzbhydra2:v3.13.0' } } stage('Notify gchat') {