build/ci/Dockerfile: add ibazel
ibazel (a.k.a. bazel-watcher) is a tool which wraps bazel and
automatically rebuilds/restarts targets if source files or
dependencies change.
Change-Id: Ifd5b53619c597c28eaef217067e619430f71d885
Reviewed-on: https://review.monogon.dev/c/monogon/+/199
Reviewed-by: Leopold Schabel <leo@nexantic.com>
diff --git a/scripts/bin/ibazel b/scripts/bin/ibazel
new file mode 100755
index 0000000..3c32571
--- /dev/null
+++ b/scripts/bin/ibazel
@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+set -euo pipefail
+
+# ibazel doesn't take a --output_user_root, set it using the per-user .bazelrc inside the container.
+podman exec -i monogon-dev bash -c "cat - > /user/.bazelrc" <<EOF
+startup --output_user_root ${HOME}/.cache/bazel-monogon
+EOF
+
+exec podman exec -it monogon-dev ibazel "$@"