aboutsummaryrefslogtreecommitdiffstats
path: root/tools/build-env/Containerfile
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2023-11-12 13:02:38 +0100
committerKim Alvefur <zash@zash.se>2023-11-12 13:02:38 +0100
commitb239732046f737d51a4b004b30c4bd3699bf3ad2 (patch)
treed37ccb464428f008a8bdde0060a4f2e1a633c87a /tools/build-env/Containerfile
parentff032aa41be7fb61fdc9b70383830e31a1f3acc3 (diff)
downloadprosody-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/Containerfile')
-rw-r--r--tools/build-env/Containerfile31
1 files changed, 31 insertions, 0 deletions
diff --git a/tools/build-env/Containerfile b/tools/build-env/Containerfile
new file mode 100644
index 00000000..6ba02ba0
--- /dev/null
+++ b/tools/build-env/Containerfile
@@ -0,0 +1,31 @@
+ARG os
+ARG dist
+FROM ${os:-debian}:${dist:-sid}
+ENV DEBIAN_FRONTEND noninteractive
+RUN set -ex; \
+ apt-get update; \
+ apt-get install -y --no-install-recommends \
+ ccache dh-lua libicu-dev libidn11-dev libssl-dev \
+ lua-bitop lua-dbi-mysql lua-dbi-postgresql lua-dbi-sqlite3 \
+ lua-event lua-expat lua-filesystem lua-ldap lua-sec lua-socket \
+ luarocks shellcheck mercurial; \
+ apt-get install -y ca-certificates dns-root-data; \
+ apt-get install -y lua-bit32 || true; \
+ apt-get install -y lua-busted || true; \
+ apt-get install -y lua-check || true; \
+ apt-get install -y lua-readline || true; \
+ apt-get install -y lua-unbound || true; \
+ update-alternatives --set lua-interpreter /usr/bin/lua5.4 || true \
+ apt-get clean
+
+# Place this file in an empty directory and build the image with
+# podman build . -t prosody.im/build-env
+#
+# Substituting podman for docker should work, where that is what's available.
+#
+# Then in a source directory, run:
+# podman run -it --rm -v "$PWD:$PWD" -w "$PWD" --entrypoint /bin/bash \
+# --userns=keep-id --network host prosody.im/build-env
+#
+# In the resulting environment everything required to compile and run prosody
+# is available, so e.g. `./configure; make; ./prosody` should Just Work!