From 2b277df7086e2e12addeb08b96195aedde2390ec Mon Sep 17 00:00:00 2001 From: Matthias Vogelgesang Date: Sun, 19 Apr 2026 21:06:06 +0200 Subject: [PATCH] Add Docker image build script --- build-docker-image.sh | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100755 build-docker-image.sh diff --git a/build-docker-image.sh b/build-docker-image.sh new file mode 100755 index 0000000..0424bc3 --- /dev/null +++ b/build-docker-image.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +set -o errexit +set -o nounset +set -o pipefail + +VERSION=$(git describe --tags) + +docker build --target amd64 -t quxfoo/wastebin:${VERSION}-amd64 . +docker build --target arm64 -t quxfoo/wastebin:${VERSION}-arm64 . + +docker push quxfoo/wastebin:${VERSION}-amd64 +docker push quxfoo/wastebin:${VERSION}-arm64 + +docker manifest create quxfoo/wastebin:${VERSION} \ + quxfoo/wastebin:${VERSION}-amd64 \ + quxfoo/wastebin:${VERSION}-arm64 + +docker manifest annotate quxfoo/wastebin:${VERSION} \ + quxfoo/wastebin:${VERSION}-arm64 \ + --os linux \ + --arch arm64 + +docker manifest create --amend quxfoo/wastebin:latest \ + quxfoo/wastebin:${VERSION}-amd64 \ + quxfoo/wastebin:${VERSION}-arm64 + +docker manifest annotate quxfoo/wastebin:latest \ + quxfoo/wastebin:${VERSION}-arm64 \ + --os linux \ + --arch arm64 + +docker manifest inspect quxfoo/wastebin:${VERSION} + +docker manifest push quxfoo/wastebin:${VERSION} +docker manifest push quxfoo/wastebin:latest -- 2.51.2