#!/usr/bin/env bash

image=${PODMAN_IMAGE:-localhost/spark:autobuilder}

podman_cmd=(
	podman run --rm -it -u root
	--userns=keep-id
	-v "$PWD:/buildroot"
	--workdir /buildroot
	--name "autobuilder.$$"
	--env "BUILDUSER=$USER"
	"$image" /build "$@"
)

"${podman_cmd[@]}"