Add container registry workflow with build script
This commit is contained in:
26
scripts/build-and-push.sh
Executable file
26
scripts/build-and-push.sh
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/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}"
|
||||
|
||||
FULL_IMAGE="${REGISTRY}/${IMAGE_NAME}:${TAG}"
|
||||
|
||||
echo "🔨 Building image: ${FULL_IMAGE}"
|
||||
docker build -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"
|
||||
|
||||
Reference in New Issue
Block a user