+++ /dev/null
-Docker Build
-------------
-
-```
-$ export DISTRO=debian-buster # also debian-11
-$ export KNOT_BRANCH=3.0 # also master
-$ docker build --no-cache -t registry.nic.cz/knot/knot-resolver/ci/$DISTRO:knot-$KNOT_BRANCH --build-arg KNOT_BRANCH=$KNOT_BRANCH $DISTRO
-
-$ docker login registry.nic.cz
-$ docker push registry.nic.cz/knot/knot-resolver/ci/$DISTRO:knot-$KNOT_BRANCH
-```
--- /dev/null
+#!/bin/bash
+# build specified docker image
+
+CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
+source "${CURRENT_DIR}"/vars.sh "$@"
+set -ex
+
+docker build --no-cache -t "${FULL_NAME}" "${IMAGE}" --build-arg KNOT_BRANCH=${KNOT_BRANCH}
--- /dev/null
+#!/bin/bash
+# upload docker image into registry
+
+CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
+source "${CURRENT_DIR}"/vars.sh "$@"
+set -ex
+
+docker push "${FULL_NAME}"
--- /dev/null
+#!/bin/bash
+# build and upload docker image(s) into registry
+#
+# this is a simple wrapper around build.sh and update.sh
+#
+# to build & upload all images: ./update.sh */
+
+if [[ $# -le 0 ]]; then
+ echo "usage: $0 IMAGE..."
+ exit 1
+fi
+set -e
+
+for ARG in "$@"
+do
+ IMAGE=${ARG%/}
+ echo "Building $IMAGE..."
+ ./build.sh $IMAGE
+ echo "Pushing $IMAGE..."
+ ./push.sh $IMAGE
+done
+
--- /dev/null
+#!/bin/bash
+# define common variables for image build scripts
+
+KNOT_BRANCH="${KNOT_BRANCH:-3.1}"
+
+REGISTRY="registry.nic.cz/knot/knot-resolver/ci"
+IMAGE=$1
+if [ -z "${IMAGE}" ]; then
+ echo "image name not provided"
+ exit 1
+fi
+TAG="knot-${KNOT_BRANCH}"
+FULL_NAME="${REGISTRY}/${IMAGE}:${TAG}"