From 4f2466eb3925b2d3e550fa689deee9d7b3663fda Mon Sep 17 00:00:00 2001 From: Florian Wilhelm <2292245+fwilhe@users.noreply.github.com> Date: Tue, 12 Dec 2023 15:29:00 +0000 Subject: [PATCH 1/2] Define builder version in dockerfile This change is needed to allow keeping the builder updated via dependabot. --- build | 11 +++++++++-- builder.dockerfile | 4 ++++ 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 builder.dockerfile diff --git a/build b/build index 5483fa5..49e9c58 100755 --- a/build +++ b/build @@ -3,7 +3,7 @@ set -euo pipefail shopt -s nullglob -container_image=ghcr.io/gardenlinux/builder:8e513c0afda1db01b4b14b6d8245bb077fde210e +container_image=localhost/builder container_engine=podman target_dir=.build @@ -75,7 +75,14 @@ done if [ "$container_image" = localhost/builder ]; then dir="$(dirname -- "$(realpath -- "${BASH_SOURCE[0]}")")" - "$container_engine" build -t "$container_image" "$dir" + # Build from 'builder.dockerfile' if that exists, otherwise the default file name will be 'Dockerfile' or 'Containerfile'. + # It is recommended to call the file 'builder.dockerfile' to make it's intention clear. + # That file might only contain a single line 'FROM ghcr.io/gardenlinux/builder:...' which can be updated via dependabot. + if [[ -f builder.dockerfile ]]; then + "$container_engine" build -t "$container_image" -f builder.dockerfile "$dir" + else + "$container_engine" build -t "$container_image" "$dir" + fi fi repo="$(./get_repo)" diff --git a/builder.dockerfile b/builder.dockerfile new file mode 100644 index 0000000..df38f1f --- /dev/null +++ b/builder.dockerfile @@ -0,0 +1,4 @@ +# This file intentionally only has the 'FROM' line. +# Defining the builder version this way allows us to update it via dependabot which was not possible any other way. + +FROM ghcr.io/gardenlinux/builder:8e513c0afda1db01b4b14b6d8245bb077fde210e From ce442495415ec7068e7af01454f14822fa51f24b Mon Sep 17 00:00:00 2001 From: Florian Wilhelm <2292245+fwilhe@users.noreply.github.com> Date: Wed, 13 Dec 2023 10:46:04 +0100 Subject: [PATCH 2/2] Update builder.dockerfile --- builder.dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/builder.dockerfile b/builder.dockerfile index df38f1f..330e23a 100644 --- a/builder.dockerfile +++ b/builder.dockerfile @@ -1,4 +1,3 @@ -# This file intentionally only has the 'FROM' line. -# Defining the builder version this way allows us to update it via dependabot which was not possible any other way. +# Dependency management via Dependabot FROM ghcr.io/gardenlinux/builder:8e513c0afda1db01b4b14b6d8245bb077fde210e