diff options
author | Kim Alvefur <zash@zash.se> | 2023-11-12 13:02:38 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2023-11-12 13:02:38 +0100 |
commit | b239732046f737d51a4b004b30c4bd3699bf3ad2 (patch) | |
tree | d37ccb464428f008a8bdde0060a4f2e1a633c87a /tools/build-env/here.sh | |
parent | ff032aa41be7fb61fdc9b70383830e31a1f3acc3 (diff) | |
download | prosody-b239732046f737d51a4b004b30c4bd3699bf3ad2.tar.gz prosody-b239732046f737d51a4b004b30c4bd3699bf3ad2.zip |
tools/build-env: Tools for building and testing in a container
./tools/build-env/build.sh
Creates a container image based on Debian or Ubuntu
./tools/build-env/here.sh
Starts a container and mounts in the current working directory, from
where one can ./configure; make; make test etc
Diffstat (limited to 'tools/build-env/here.sh')
-rwxr-xr-x | tools/build-env/here.sh | 19 |
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" "$@" |