diff --git a/Dockerfile b/Dockerfile index 5dc39fb..523efa7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # Using https://github.com/gliderlabs/docker-alpine, # plus https://github.com/just-containers/s6-overlay for a s6 Docker overlay. -FROM alpine:latest +FROM alpine:3.14 # Initially was based on work of Christian Lück . LABEL description="A complete, self-hosted Tiny Tiny RSS (TTRSS) environment." \ maintainer="Andreas Löffler " @@ -23,7 +23,9 @@ COPY root / # Add s6 overlay. # Note: Tweak this line if you're running anything other than x86 AMD64 (64-bit). -RUN curl -L -s https://github.com/just-containers/s6-overlay/releases/download/v3.1.2.1/s6-overlay-x86_64.tar.xz | tar xvf - -C / +RUN curl -L -s https://github.com/just-containers/s6-overlay/releases/download/v3.1.3.0/s6-overlay-x86_64.tar.xz -o s6-overlay-x86_64.tar.xz && \ + tar xvf s6-overlay-x86_64.tar.xz -C / && \ + rm s6-overlay-x86_64.tar.xz # Add wait-for-it.sh ADD https://raw.githubusercontent.com/Eficode/wait-for/master/wait-for /srv diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..b897d15 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,38 @@ +pipeline { + environment { + registry = 'https://registry.hub.docker.com' + registryCredential = 'dockerhub_jcabillot' + dockerImage = 'jcabillot/ttrss' + } + + agent any + + triggers { + cron('@midnight') + } + + stages { + stage('Clone repository') { + steps{ + checkout scm + } + } + + stage('Build image') { + steps{ + sh 'docker build --force-rm=true --no-cache=true --pull -t ${dockerImage} .' + } + } + + stage('Deploy Image') { + steps{ + script { + withCredentials([usernamePassword(credentialsId: 'dockerhub_jcabillot', usernameVariable: 'DOCKER_USER', passwordVariable: 'DOCKER_PASS')]) { + sh 'docker login --username ${DOCKER_USER} --password ${DOCKER_PASS}' + sh 'docker push ${dockerImage}' + } + } + } + } + } +}