Files
source-stack/rocky9-system/build.sh
T
GuofangandClaude Sonnet 5.5 d57ea76fa4 Add rocky9-system image using distribution libraries
Install libraries from Rocky Linux 9, CRB and EPEL instead of building
from source; packages missing from those repositories are skipped.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 11:17:27 +08:00

20 lines
465 B
Bash
Executable File

#!/bin/sh
set -eu
IMAGE_NAME="${IMAGE_NAME:-rocky9-system-stack}"
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
if command -v podman >/dev/null 2>&1; then
ENGINE=podman
elif command -v docker >/dev/null 2>&1; then
ENGINE=docker
else
echo "Error: Podman or Docker is required." >&2
exit 1
fi
ENGINE="${CONTAINER_ENGINE:-$ENGINE}"
echo "Building image $IMAGE_NAME with $ENGINE ..."
exec "$ENGINE" build --tag "$IMAGE_NAME" "$SCRIPT_DIR"