From 295b8cfdec251852e2c002f2b5fd4299e63d1559 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Sat, 10 Jun 2023 10:01:06 +0200 Subject: add new version --- build_image.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 build_image.sh (limited to 'build_image.sh') diff --git a/build_image.sh b/build_image.sh new file mode 100644 index 0000000..d83ccc3 --- /dev/null +++ b/build_image.sh @@ -0,0 +1,28 @@ +#!/bin/bash +usage(){ + echo -e "Usage:\n\t$0 [arm|arm64|x86]" + exit 1 +} +if [[ -z "$1" ]]; then + usage +fi +ARCH=${1,,} +[[ -d ./images ]] || mkdir ./images +case $ARCH in + arm) + sudo docker buildx build --no-cache --platform linux/arm/v6 -t mdns . + sudo docker save mdns -o ./images/mdns_arm32.tar + ;; + arm64) + sudo docker buildx build --no-cache --platform linux/arm64 -t mdns . + sudo docker save mdns -o ./images/mdns_arm64.tar + ;; + x86) + sudo docker buildx build --no-cache --platform linux/amd64 -t mdns . + sudo docker save mdns -o ./images/mdns_x86.tar + ;; + *) + usage + ;; +esac + -- cgit v1.2.3