Compare commits
4 Commits
Author | SHA1 | Date |
---|---|---|
chris | b2c15d3f7f | |
chris | 4d87c809d6 | |
chris | ab8b3b7787 | |
chris | af961f1860 |
14
Dockerfile
14
Dockerfile
|
@ -1,19 +1,17 @@
|
|||
FROM alpine as build
|
||||
|
||||
ARG VERSION
|
||||
ENV ALPINE_SERIES 3.11
|
||||
ENV ALPINE_MIRROR https://ftp.halifax.rwth-aachen.de/alpine/v${ALPINE_SERIES}
|
||||
ENV ALPINE_SERIES edge
|
||||
ENV ALPINE_MIRROR https://ftp.halifax.rwth-aachen.de/alpine/edge
|
||||
ENV ALPINE_ARCH x86_64
|
||||
|
||||
WORKDIR /root
|
||||
RUN set -xo pipefail; apk add --no-cache curl gnupg &&\
|
||||
RUN set -xo pipefail; apk add --no-cache curl &&\
|
||||
curl -LO ${ALPINE_MIRROR}/releases/${ALPINE_ARCH}/alpine-minirootfs-${VERSION}-${ALPINE_ARCH}.tar.gz &&\
|
||||
curl -LO ${ALPINE_MIRROR}/releases/${ALPINE_ARCH}/alpine-minirootfs-${VERSION}-${ALPINE_ARCH}.tar.gz.asc &&\
|
||||
gpg --keyserver pool.sks-keyservers.net --recv 0482D84022F52DF1C4E7CD43293ACD0907D9495A &&\
|
||||
gpg --verify alpine-minirootfs-${VERSION}-${ALPINE_ARCH}.tar.gz.asc alpine-minirootfs-${VERSION}-${ALPINE_ARCH}.tar.gz &&\
|
||||
curl -LO ${ALPINE_MIRROR}/releases/${ALPINE_ARCH}/alpine-minirootfs-${VERSION}-${ALPINE_ARCH}.tar.gz.sha512 &&\
|
||||
sha512sum -c alpine-minirootfs-${VERSION}-${ALPINE_ARCH}.tar.gz.sha512 &&\
|
||||
mkdir /dest &&\
|
||||
tar -C /dest -xvzf alpine-minirootfs-${VERSION}-${ALPINE_ARCH}.tar.gz &&\
|
||||
sed -i "s#http://dl-cdn.alpinelinux.org/alpine/v${ALPINE_SERIES}#${ALPINE_MIRROR}#g" /dest/etc/apk/repositories
|
||||
tar -C /dest -xvzf alpine-minirootfs-${VERSION}-${ALPINE_ARCH}.tar.gz
|
||||
|
||||
FROM scratch
|
||||
ARG VERSION
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
version = "3.11.7"
|
||||
version = "20200917"
|
||||
project = "alpine"
|
||||
repo = "zknt"
|
||||
registry = "reg.zknt.org"
|
||||
|
@ -14,14 +14,14 @@ pipeline {
|
|||
script {
|
||||
def customImage = docker.build(registry+'/'+repo+'/'+project, "--pull --build-arg VERSION=$version --build-arg DATE=$timeStamp .")
|
||||
customImage.push(version)
|
||||
customImage.push("3.11")
|
||||
customImage.push("edge")
|
||||
def io_registry_credentials = "3deeee3d-6fce-4430-98dd-9b4db56f43f7"
|
||||
withDockerRegistry([ credentialsId: io_registry_credentials ]) {
|
||||
def io_registry_image = repo + '/' + project + ':' + version
|
||||
sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + io_registry_image
|
||||
sh "docker push " + io_registry_image
|
||||
sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + io_registry_image.split(/\:/)[0] + ":3.11"
|
||||
sh "docker push " + io_registry_image.split(/\:/)[0] + ":3.11"
|
||||
sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + io_registry_image.split(/\:/)[0] + ":edge"
|
||||
sh "docker push " + io_registry_image.split(/\:/)[0] + ":edge"
|
||||
}
|
||||
|
||||
def quay_credentials= "18fb6f7e-c6bc-4d06-9bf9-08c2af6bfc1a"
|
||||
|
@ -29,8 +29,8 @@ pipeline {
|
|||
def quay_image = 'quay.io/' + repo + '/' + project + ':' + version
|
||||
sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + quay_image
|
||||
sh "docker push " + quay_image
|
||||
sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + quay_image.split(/\:/)[0] + ":3.11"
|
||||
sh "docker push " + quay_image.split(/\:/)[0] + ":3.11"
|
||||
sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + quay_image.split(/\:/)[0] + ":edge"
|
||||
sh "docker push " + quay_image.split(/\:/)[0] + ":edge"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
version: 3.11.7
|
||||
---
|
||||
version: 20200917
|
||||
project: alpine
|
||||
additional_tags:
|
||||
- 3.11
|
||||
- edge
|
||||
|
|
Loading…
Reference in New Issue