build/rebuild.sh: rebuild when current image has pending updates
This commit is contained in:
parent
aec33942bb
commit
d96ffe2e95
17
build/rebuild.sh
Executable file
17
build/rebuild.sh
Executable file
@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
updates_available () {
|
||||||
|
if test "$(docker run -it --rm $1 /bin/sh -c 'apt -qqq update && apt -qq list --upgradable')" != ""; then
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
if updates_available pommib/powerdns:4.4-bullseye; then
|
||||||
|
./debian/11/build.sh
|
||||||
|
fi
|
||||||
|
|
||||||
|
if updates_available pommib/powerdns:4.6-bookworm; then
|
||||||
|
./debian/12/build.sh
|
||||||
|
fi
|
1
debian/11/Dockerfile
vendored
1
debian/11/Dockerfile
vendored
@ -2,6 +2,7 @@ FROM debian:bullseye-slim
|
|||||||
|
|
||||||
RUN set -eux; \
|
RUN set -eux; \
|
||||||
apt-get update; \
|
apt-get update; \
|
||||||
|
apt-get upgrade -y; \
|
||||||
apt-get install -y --no-install-recommends \
|
apt-get install -y --no-install-recommends \
|
||||||
pdns-server \
|
pdns-server \
|
||||||
pdns-backend-bind \
|
pdns-backend-bind \
|
||||||
|
9
debian/11/build.sh
vendored
Executable file
9
debian/11/build.sh
vendored
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -x
|
||||||
|
|
||||||
|
IMAGE=pommib/powerdns:4.4-bullseye
|
||||||
|
docker pull $IMAGE
|
||||||
|
docker pull debian:bullseye-slim
|
||||||
|
docker build --no-cache -t $IMAGE ./debian/11/
|
||||||
|
docker push $IMAGE
|
1
debian/12/Dockerfile
vendored
1
debian/12/Dockerfile
vendored
@ -2,6 +2,7 @@ FROM debian:bookworm-slim
|
|||||||
|
|
||||||
RUN set -eux; \
|
RUN set -eux; \
|
||||||
apt-get update; \
|
apt-get update; \
|
||||||
|
apt-get upgrade -y; \
|
||||||
apt-get install -y --no-install-recommends \
|
apt-get install -y --no-install-recommends \
|
||||||
pdns-server \
|
pdns-server \
|
||||||
pdns-backend-bind \
|
pdns-backend-bind \
|
||||||
|
12
debian/12/build.sh
vendored
Executable file
12
debian/12/build.sh
vendored
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -x
|
||||||
|
|
||||||
|
IMAGE=pommib/powerdns:4.6-bookworm
|
||||||
|
docker pull $IMAGE
|
||||||
|
docker pull debian:bookworm-slim
|
||||||
|
docker build --no-cache -t $IMAGE ./debian/12/
|
||||||
|
docker push $IMAGE
|
||||||
|
|
||||||
|
docker tag $IMAGE pommib/powerdns:latest
|
||||||
|
docker push pommib/powerdns:latest
|
Loading…
Reference in New Issue
Block a user