Refactor build scripts to consistently use Podman for image building
This commit is contained in:
1 parent
52ea874506
commit
524b90737e
3 files changed
+12
-30
No files matched your search
+4
-10
@@ -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"
|
||||
Reference in new issue
Block a user