diff --git a/build/rebuild.sh b/build/rebuild.sh new file mode 100755 index 0000000..641b0de --- /dev/null +++ b/build/rebuild.sh @@ -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 diff --git a/debian/11/Dockerfile b/debian/11/Dockerfile index b14e687..70beedd 100644 --- a/debian/11/Dockerfile +++ b/debian/11/Dockerfile @@ -2,6 +2,7 @@ FROM debian:bullseye-slim RUN set -eux; \ apt-get update; \ + apt-get upgrade -y; \ apt-get install -y --no-install-recommends \ pdns-server \ pdns-backend-bind \ diff --git a/debian/11/build.sh b/debian/11/build.sh new file mode 100755 index 0000000..c7a1f93 --- /dev/null +++ b/debian/11/build.sh @@ -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 diff --git a/debian/12/Dockerfile b/debian/12/Dockerfile index 51a730c..57fe68b 100644 --- a/debian/12/Dockerfile +++ b/debian/12/Dockerfile @@ -2,6 +2,7 @@ FROM debian:bookworm-slim RUN set -eux; \ apt-get update; \ + apt-get upgrade -y; \ apt-get install -y --no-install-recommends \ pdns-server \ pdns-backend-bind \ diff --git a/debian/12/build.sh b/debian/12/build.sh new file mode 100755 index 0000000..acb58d4 --- /dev/null +++ b/debian/12/build.sh @@ -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