Compare commits
3 commits
Author | SHA1 | Date | |
---|---|---|---|
68d7edf278 | |||
702e60c0a0 | |||
3feddb4316 |
3 changed files with 25 additions and 14 deletions
22
Dockerfile
22
Dockerfile
|
@ -2,7 +2,8 @@ FROM debian:stable as builder
|
||||||
RUN set -xe;\
|
RUN set -xe;\
|
||||||
apt-get update &&\
|
apt-get update &&\
|
||||||
apt-get install -y debootstrap &&\
|
apt-get install -y debootstrap &&\
|
||||||
debootstrap --include=apt,ca-certificates,curl --foreign --variant=minbase buster /dest &&\
|
mount &&\
|
||||||
|
debootstrap --include=apt,ca-certificates,curl --foreign --variant=minbase bullseye /dest &&\
|
||||||
sed -i 's/setup_proc//' /dest/debootstrap/suite-script
|
sed -i 's/setup_proc//' /dest/debootstrap/suite-script
|
||||||
|
|
||||||
FROM scratch as bootstrapped
|
FROM scratch as bootstrapped
|
||||||
|
@ -13,7 +14,8 @@ RUN set -xe;\
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
FROM bootstrapped as toolbuilder
|
FROM bootstrapped as toolbuilder
|
||||||
ENV GOSU_VERSION="1.12"
|
ENV GOSU_VERSION="1.14"
|
||||||
|
ENV SUEXEC_VERSION="0.2"
|
||||||
ENV DUMB_INIT_VERSION="1.2.5"
|
ENV DUMB_INIT_VERSION="1.2.5"
|
||||||
RUN set -xe;\
|
RUN set -xe;\
|
||||||
apt-get update &&\
|
apt-get update &&\
|
||||||
|
@ -21,7 +23,8 @@ RUN set -xe;\
|
||||||
git clone https://github.com/tianon/gosu.git /build &&\
|
git clone https://github.com/tianon/gosu.git /build &&\
|
||||||
cd /build &&\
|
cd /build &&\
|
||||||
git checkout $GOSU_VERSION &&\
|
git checkout $GOSU_VERSION &&\
|
||||||
go get || echo 0; go build
|
go mod download &&\
|
||||||
|
go build
|
||||||
RUN set -xe;\
|
RUN set -xe;\
|
||||||
apt-get install -y build-essential &&\
|
apt-get install -y build-essential &&\
|
||||||
cd / &&\
|
cd / &&\
|
||||||
|
@ -30,17 +33,26 @@ RUN set -xe;\
|
||||||
cd dumb-init-${DUMB_INIT_VERSION} &&\
|
cd dumb-init-${DUMB_INIT_VERSION} &&\
|
||||||
make &&\
|
make &&\
|
||||||
cp dumb-init /
|
cp dumb-init /
|
||||||
|
RUN set -xe;\
|
||||||
|
apt-get install -y libc6-dev make gcc &&\
|
||||||
|
cd / &&\
|
||||||
|
curl -LO https://github.com/ncopa/su-exec/archive/refs/tags/v0.2.tar.gz &&\
|
||||||
|
tar xvaf v0.2.tar.gz &&\
|
||||||
|
cd su-exec-* &&\
|
||||||
|
make &&\
|
||||||
|
cp su-exec /
|
||||||
|
|
||||||
FROM bootstrapped
|
FROM bootstrapped
|
||||||
ARG DATE
|
ARG DATE
|
||||||
ENV GOSU_VERSION="1.12"
|
ENV GOSU_VERSION="1.12"
|
||||||
ENV DUMB_INIT_VERSION="1.2.3"
|
ENV DUMB_INIT_VERSION="1.2.3"
|
||||||
COPY --from=toolbuilder /build/build /usr/local/sbin/gosu
|
COPY --from=toolbuilder /build/gosu /usr/local/sbin/gosu
|
||||||
COPY --from=toolbuilder /dumb-init /usr/local/sbin/dumb-init
|
COPY --from=toolbuilder /dumb-init /usr/local/sbin/dumb-init
|
||||||
|
COPY --from=toolbuilder /su-exec /usr/local/sbin/su-exec
|
||||||
COPY apt-install /bin/apt-install
|
COPY apt-install /bin/apt-install
|
||||||
COPY checkupdates /bin/checkupdates
|
COPY checkupdates /bin/checkupdates
|
||||||
CMD "bash"
|
CMD "bash"
|
||||||
LABEL version.debian=buster \
|
LABEL version.debian=bullseye \
|
||||||
version.gosu=$GOSU_VERSION \
|
version.gosu=$GOSU_VERSION \
|
||||||
version.dumb-init=$DUMB_INIT_VERSION \
|
version.dumb-init=$DUMB_INIT_VERSION \
|
||||||
build.date=$DATE
|
build.date=$DATE
|
||||||
|
|
12
Jenkinsfile
vendored
12
Jenkinsfile
vendored
|
@ -1,4 +1,4 @@
|
||||||
version = "10"
|
version = "11"
|
||||||
project = "debian"
|
project = "debian"
|
||||||
repo = "zknt"
|
repo = "zknt"
|
||||||
registry = "reg.zknt.org"
|
registry = "reg.zknt.org"
|
||||||
|
@ -14,15 +14,15 @@ pipeline {
|
||||||
script {
|
script {
|
||||||
def customImage = docker.build(registry+'/'+repo+'/'+project, "--pull --build-arg VERSION=$version --build-arg DATE=$timeStamp .")
|
def customImage = docker.build(registry+'/'+repo+'/'+project, "--pull --build-arg VERSION=$version --build-arg DATE=$timeStamp .")
|
||||||
customImage.push(version)
|
customImage.push(version)
|
||||||
customImage.push("buster")
|
customImage.push("bullseye")
|
||||||
customImage.push("stable")
|
customImage.push("stable")
|
||||||
def io_registry_credentials = "3deeee3d-6fce-4430-98dd-9b4db56f43f7"
|
def io_registry_credentials = "3deeee3d-6fce-4430-98dd-9b4db56f43f7"
|
||||||
withDockerRegistry([ credentialsId: io_registry_credentials ]) {
|
withDockerRegistry([ credentialsId: io_registry_credentials ]) {
|
||||||
def io_registry_image = repo + '/' + project + ':' + version
|
def io_registry_image = repo + '/' + project + ':' + version
|
||||||
sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + io_registry_image
|
sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + io_registry_image
|
||||||
sh "docker push " + io_registry_image
|
sh "docker push " + io_registry_image
|
||||||
sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + io_registry_image.split(/\:/)[0] + ":buster"
|
sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + io_registry_image.split(/\:/)[0] + ":bullseye"
|
||||||
sh "docker push " + io_registry_image.split(/\:/)[0] + ":buster"
|
sh "docker push " + io_registry_image.split(/\:/)[0] + ":bullseye"
|
||||||
sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + io_registry_image.split(/\:/)[0] + ":stable"
|
sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + io_registry_image.split(/\:/)[0] + ":stable"
|
||||||
sh "docker push " + io_registry_image.split(/\:/)[0] + ":stable"
|
sh "docker push " + io_registry_image.split(/\:/)[0] + ":stable"
|
||||||
}
|
}
|
||||||
|
@ -32,8 +32,8 @@ pipeline {
|
||||||
def quay_image = 'quay.io/' + repo + '/' + project + ':' + version
|
def quay_image = 'quay.io/' + repo + '/' + project + ':' + version
|
||||||
sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + quay_image
|
sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + quay_image
|
||||||
sh "docker push " + quay_image
|
sh "docker push " + quay_image
|
||||||
sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + quay_image.split(/\:/)[0] + ":buster"
|
sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + quay_image.split(/\:/)[0] + ":bullseye"
|
||||||
sh "docker push " + quay_image.split(/\:/)[0] + ":buster"
|
sh "docker push " + quay_image.split(/\:/)[0] + ":bullseye"
|
||||||
sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + quay_image.split(/\:/)[0] + ":stable"
|
sh "docker image tag " + registry+'/'+repo+'/'+project+':'+version + ' ' + quay_image.split(/\:/)[0] + ":stable"
|
||||||
sh "docker push " + quay_image.split(/\:/)[0] + ":stable"
|
sh "docker push " + quay_image.split(/\:/)[0] + ":stable"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
version: 10
|
version: 11
|
||||||
project: debian
|
project: debian
|
||||||
additional_tags:
|
additional_tags:
|
||||||
- buster
|
- bullseye
|
||||||
- stable
|
|
||||||
|
|
Loading…
Reference in a new issue