Files
golang-protoc/build_and_push_docker.sh
talksik f6d5f4f0d4 init
2026-04-29 14:51:04 -07:00

21 lines
553 B
Bash
Executable File

#!/bin/bash -eu
echo "The following script will build the talksik/golang-protoc image and push to docker both architectures: amd64 & arm64"
read -p "Press 'y' to confirm: " -n 1 confirm
DOCKER_HUB_REPOSITORY=talksik/golang-protoc:latest
if [[ "$confirm" == "y" ]]; then
docker buildx build \
--platform linux/amd64,linux/arm64 \
--build-arg PLATFORM=$(echo $BUILDPLATFORM | cut -d '/' -f 2) \
--push \
-f ./golang-protoc.Dockerfile \
-t $DOCKER_HUB_REPOSITORY . \
--progress=plain
else
echo "Confirmation canceled."
fi