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>
20 lines
465 B
Bash
Executable File
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"
|