3.9.0
This commit is contained in:
parent
cad7c91c9b
commit
87a837e279
15
Dockerfile
15
Dockerfile
|
@ -1,13 +1,16 @@
|
||||||
FROM alpine as build
|
FROM alpine as build
|
||||||
ARG ALPINE_VERSION
|
|
||||||
ENV ALPINE_MIRROR https://uk.alpinelinux.org/alpine/v3.8
|
ARG VERSION
|
||||||
|
ENV ALPINE_SERIES 3.9
|
||||||
|
ENV ALPINE_MIRROR https://uk.alpinelinux.org/alpine/v${ALPINE_SERIES}
|
||||||
ENV ALPINE_ARCH x86_64
|
ENV ALPINE_ARCH x86_64
|
||||||
|
|
||||||
WORKDIR /root
|
WORKDIR /root
|
||||||
RUN apk add --no-cache curl &&\
|
RUN set -x; apk add --no-cache curl &&\
|
||||||
curl -LO ${ALPINE_MIRROR}/releases/${ALPINE_ARCH}/alpine-minirootfs-${ALPINE_VERSION}-${ALPINE_ARCH}.tar.gz &&\
|
curl -LO ${ALPINE_MIRROR}/releases/${ALPINE_ARCH}/alpine-minirootfs-${VERSION}-${ALPINE_ARCH}.tar.gz &&\
|
||||||
mkdir /dest &&\
|
mkdir /dest &&\
|
||||||
tar -C /dest -xvzf alpine-minirootfs-${ALPINE_VERSION}-${ALPINE_ARCH}.tar.gz &&\
|
tar -C /dest -xvzf alpine-minirootfs-${VERSION}-${ALPINE_ARCH}.tar.gz &&\
|
||||||
sed -i "s#http://dl-cdn.alpinelinux.org/alpine/v3.8#${ALPINE_MIRROR}#g" /dest/etc/apk/repositories
|
sed -i "s#http://dl-cdn.alpinelinux.org/alpine/v${ALPINE_SERIES}#${ALPINE_MIRROR}#g" /dest/etc/apk/repositories
|
||||||
|
|
||||||
FROM scratch
|
FROM scratch
|
||||||
COPY --from=build /dest /
|
COPY --from=build /dest /
|
||||||
|
|
|
@ -6,7 +6,7 @@ pipeline {
|
||||||
withDockerRegistry([ credentialsId: "6ff44976-23cd-4cc2-902c-de8c340e65e5", url: "https://reg.zknt.org" ]) {
|
withDockerRegistry([ credentialsId: "6ff44976-23cd-4cc2-902c-de8c340e65e5", url: "https://reg.zknt.org" ]) {
|
||||||
echo 'Starting to build docker image'
|
echo 'Starting to build docker image'
|
||||||
script {
|
script {
|
||||||
def customImage = docker.build("reg.zknt.org/zknt/alpine", "--build-arg ALPINE_VERSION=$env.BRANCH_NAME .")
|
def customImage = docker.build("reg.zknt.org/zknt/alpine", "--build-arg VERSION=$env.BRANCH_NAME .")
|
||||||
customImage.push(env.BRANCH_NAME)
|
customImage.push(env.BRANCH_NAME)
|
||||||
customImage.push(env.BRANCH_NAME.split(/\./)[0,1].join('.'))
|
customImage.push(env.BRANCH_NAME.split(/\./)[0,1].join('.'))
|
||||||
customImage.push(env.BRANCH_NAME.split(/\./)[0])
|
customImage.push(env.BRANCH_NAME.split(/\./)[0])
|
||||||
|
|
Loading…
Reference in New Issue