aboutsummaryrefslogtreecommitdiffstats
path: root/tools/build-env/here.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tools/build-env/here.sh')
-rwxr-xr-xtools/build-env/here.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/tools/build-env/here.sh b/tools/build-env/here.sh
new file mode 100755
index 00000000..1d5cb515
--- /dev/null
+++ b/tools/build-env/here.sh
@@ -0,0 +1,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" "$@"