This repository has been archived on 2024-06-05. You can view files and clone it, but cannot push or open issues or pull requests.
mdns-repeater-mikrotik/build_image.sh

29 lines
589 B
Bash
Raw Normal View History

2023-06-10 10:01:06 +02:00
#!/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