diff --git a/alpine3.24/build.sh b/alpine3.24/build.sh index b4a3339..ca4d4c2 100755 --- a/alpine3.24/build.sh +++ b/alpine3.24/build.sh @@ -5,16 +5,10 @@ set -eu IMAGE_NAME="${IMAGE_NAME:-alpine3.24-source-stack}" SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd) -if [ -n "${CONTAINER_ENGINE:-}" ]; then - ENGINE=$CONTAINER_ENGINE -elif command -v docker >/dev/null 2>&1; then - ENGINE=docker -elif command -v podman >/dev/null 2>&1; then - ENGINE=podman -else - echo "Error: Docker or Podman is required." >&2 +if ! command -v podman >/dev/null 2>&1; then + echo "Error: Podman is required." >&2 exit 1 fi -echo "Building image $IMAGE_NAME with $ENGINE ..." -exec "$ENGINE" build --tag "$IMAGE_NAME" "$SCRIPT_DIR" +echo "Building image $IMAGE_NAME with podman ..." +exec podman build --tag "$IMAGE_NAME" "$SCRIPT_DIR" diff --git a/debian13/build.sh b/debian13/build.sh index 8e3cd62..c433e58 100755 --- a/debian13/build.sh +++ b/debian13/build.sh @@ -5,16 +5,10 @@ set -eu IMAGE_NAME="${IMAGE_NAME:-debian13-source-stack}" SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd) -if [ -n "${CONTAINER_ENGINE:-}" ]; then - ENGINE=$CONTAINER_ENGINE -elif command -v docker >/dev/null 2>&1; then - ENGINE=docker -elif command -v podman >/dev/null 2>&1; then - ENGINE=podman -else - echo "Error: Docker or Podman is required." >&2 +if ! command -v podman >/dev/null 2>&1; then + echo "Error: Podman is required." >&2 exit 1 fi -echo "Building image $IMAGE_NAME with $ENGINE ..." -exec "$ENGINE" build --tag "$IMAGE_NAME" "$SCRIPT_DIR" +echo "Building image $IMAGE_NAME with podman ..." +exec podman build --tag "$IMAGE_NAME" "$SCRIPT_DIR" diff --git a/rocky9/build.sh b/rocky9/build.sh index 38e4b49..498bf81 100755 --- a/rocky9/build.sh +++ b/rocky9/build.sh @@ -5,16 +5,10 @@ set -eu IMAGE_NAME="${IMAGE_NAME:-rocky9-source-stack}" SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd) -if [ -n "${CONTAINER_ENGINE:-}" ]; then - ENGINE=$CONTAINER_ENGINE -elif command -v docker >/dev/null 2>&1; then - ENGINE=docker -elif command -v podman >/dev/null 2>&1; then - ENGINE=podman -else - echo "Error: Docker or Podman is required." >&2 +if ! command -v podman >/dev/null 2>&1; then + echo "Error: Podman is required." >&2 exit 1 fi -echo "Building image $IMAGE_NAME with $ENGINE ..." -exec "$ENGINE" build --tag "$IMAGE_NAME" "$SCRIPT_DIR" +echo "Building image $IMAGE_NAME with podman ..." +exec podman build --tag "$IMAGE_NAME" "$SCRIPT_DIR"