aboutsummaryrefslogtreecommitdiffstats
path: root/tools/build-env/here.sh
blob: 1d5cb5151e147d2a650de665b6fb61b52be3d1c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh -eux

tag="testing"

if [ "$#" -gt 0 ]; then
	tag="$1"
	shift
fi

containerify="$(command -v podman docker)"

$containerify run -it --rm \
	-v "$PWD:$PWD" \
	-w "$PWD" \
	-v "$HOME/.cache:$PWD/.cache" \
	--entrypoint /bin/bash \
	--userns=keep-id \
	--network \
	host "prosody.im/build-env:$tag" "$@"