#!/usr/bin/env bash

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

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

"${podman_cmd[@]}"