aboutsummaryrefslogtreecommitdiffstats
path: root/tools/build-env/build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tools/build-env/build.sh')
-rwxr-xr-xtools/build-env/build.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/build-env/build.sh b/tools/build-env/build.sh
new file mode 100755
index 00000000..4351f8b8
--- /dev/null
+++ b/tools/build-env/build.sh
@@ -0,0 +1,16 @@
+#!/bin/sh -eux
+
+cd "$(dirname "$0")"
+
+containerify="$(command -v podman || command -v docker)"
+
+if [ -z "$containerify" ]; then
+ echo "podman or docker required" >&2
+ exit 1
+fi
+
+$containerify build -f ./Containerfile --squash \
+ --build-arg os="${2:-debian}" \
+ --build-arg dist="${1:-testing}" \
+ -t "prosody.im/build-env:${1:-testing}"
+