nextcloud-dlna/docker-build-image.sh
2023-10-18 16:40:50 +02:00

29 lines
692 B
Bash
Executable file

#!/bin/bash
version=`./gradlew currentVersion | grep "Project version" | awk -F"version: " '{ print $2 }'`
echo "This will create docker image for version $version."
read -p "Continue [y/n]? " -n 1 -r
echo
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
exit
fi
./gradlew clean build || exit
docker buildx create \
--use \
--platform=linux/arm/v7,linux/arm64/v8,linux/amd64 \
--name multi-platform-builder
docker buildx inspect --bootstrap
docker buildx build \
--push \
--platform=linux/arm/v7,linux/arm64/v8,linux/amd64 \
--tag=thanek/nextcloud-dlna:$version .
docker buildx build \
--push \
--platform=linux/arm/v7,linux/arm64/v8,linux/amd64 \
--tag=thanek/nextcloud-dlna .