Files
questionnaire/scripts/build-and-push.sh

27 lines
705 B
Bash
Executable File

#!/bin/bash
# Build and push Docker image to Gitea Container Registry
# Gebruik: ./scripts/build-and-push.sh [tag]
# Voorbeeld: ./scripts/build-and-push.sh latest
# ./scripts/build-and-push.sh v1.0.0
set -e
# Configuratie
REGISTRY="10.0.10.205:3000"
IMAGE_NAME="bert.hausmans/questionnaire"
TAG="${1:-latest}"
PLATFORM="linux/amd64"
FULL_IMAGE="${REGISTRY}/${IMAGE_NAME}:${TAG}"
echo "🔨 Building image for ${PLATFORM}: ${FULL_IMAGE}"
docker build --platform "${PLATFORM}" -t "${FULL_IMAGE}" .
echo "📤 Pushing image to registry..."
docker push "${FULL_IMAGE}"
echo "✅ Done! Image pushed: ${FULL_IMAGE}"
echo ""
echo "📋 In Dockge: klik op 'Update' om de nieuwe image te pullen"