Files
Michael DiLeo 7327d77dcd redaction (#1)
Add the redacted source file for demo purposes

Reviewed-on: https://source.michaeldileo.org/michael_dileo/Keybard-Vagabond-Demo/pulls/1
Co-authored-by: Michael DiLeo <michael_dileo@proton.me>
Co-committed-by: Michael DiLeo <michael_dileo@proton.me>
2025-12-24 13:40:47 +00:00

42 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
set -e
# Build script for ARM64 PostGIS image compatible with CloudNativePG
REGISTRY="<YOUR_REGISTRY_URL>/library"
IMAGE_NAME="cnpg-postgis"
TAG="16.6-3.4-v2"
FULL_IMAGE="${REGISTRY}/${IMAGE_NAME}:${TAG}"
LOCAL_IMAGE="${IMAGE_NAME}:${TAG}"
echo "Building ARM64 PostGIS image: ${FULL_IMAGE}"
# Build the image
docker build \
--platform linux/arm64 \
-t "${FULL_IMAGE}" \
.
echo "Image built successfully: ${FULL_IMAGE}"
# Test the image by running a container and checking PostGIS availability
echo "Testing PostGIS installation..."
docker run --rm --platform linux/arm64 "${FULL_IMAGE}" \
postgres --version
echo "Tagging image for local testing..."
docker tag "${FULL_IMAGE}" "${LOCAL_IMAGE}"
echo "Image built and tagged as:"
echo " Harbor registry: ${FULL_IMAGE}"
echo " Local testing: ${LOCAL_IMAGE}"
echo ""
echo "To push to Harbor registry (when ready for deployment):"
echo " docker push ${FULL_IMAGE}"
echo ""
echo "Build completed successfully!"
echo "Local testing image: ${LOCAL_IMAGE}"
echo "Harbor registry image: ${FULL_IMAGE}"