From 56d45ad311562c6474cedc6850674b907d329e27 Mon Sep 17 00:00:00 2001 From: Travis Shears Date: Sat, 1 Nov 2025 17:07:20 +0100 Subject: [PATCH] add build script --- build.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 build.sh diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..71da131 --- /dev/null +++ b/build.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +set -e + +export AWS_PROFILE=personal +export AWS_REGION=eu-central-1 + +REPO_NAME="snippets-homelabstack" + +if ! aws ecr describe-repositories --repository-names "$REPO_NAME" >/dev/null 2>&1; then + aws ecr create-repository --repository-name "$REPO_NAME" +fi + +docker buildx build --platform linux/amd64,linux/arm64 -t "853019563312.dkr.ecr.eu-central-1.amazonaws.com/${REPO_NAME}:latest" --push . + +echo "Docker image built and pushed to AWS ECR"