Software / code / prosody
Annotate
tools/build-env/Containerfile @ 13525:0f7e7311eebf
util.xtemplate: Use same argument order in filters even without 'args'
This removes the different argument order used between '{x|foo}' and
'{x|foo(y)}' because the differing order was awkward and confusing.
This util does not seem to be widely used so should not be problematic
to change this part. The only known use is in mod_pubsub, which does not
use the filter function feature.
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Wed, 16 Oct 2024 16:15:05 +0200 |
| parent | 13323:7bfd6db52528 |
| rev | line source |
|---|---|
|
13323
7bfd6db52528
tools/build-env: Tools for building and testing in a container
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
1 ARG os |
|
7bfd6db52528
tools/build-env: Tools for building and testing in a container
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
2 ARG dist |
|
7bfd6db52528
tools/build-env: Tools for building and testing in a container
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
3 FROM ${os:-debian}:${dist:-sid} |
|
7bfd6db52528
tools/build-env: Tools for building and testing in a container
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
4 ENV DEBIAN_FRONTEND noninteractive |
|
7bfd6db52528
tools/build-env: Tools for building and testing in a container
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
5 RUN set -ex; \ |
|
7bfd6db52528
tools/build-env: Tools for building and testing in a container
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
6 apt-get update; \ |
|
7bfd6db52528
tools/build-env: Tools for building and testing in a container
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
7 apt-get install -y --no-install-recommends \ |
|
7bfd6db52528
tools/build-env: Tools for building and testing in a container
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
8 ccache dh-lua libicu-dev libidn11-dev libssl-dev \ |
|
7bfd6db52528
tools/build-env: Tools for building and testing in a container
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
9 lua-bitop lua-dbi-mysql lua-dbi-postgresql lua-dbi-sqlite3 \ |
|
7bfd6db52528
tools/build-env: Tools for building and testing in a container
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
10 lua-event lua-expat lua-filesystem lua-ldap lua-sec lua-socket \ |
|
7bfd6db52528
tools/build-env: Tools for building and testing in a container
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
11 luarocks shellcheck mercurial; \ |
|
7bfd6db52528
tools/build-env: Tools for building and testing in a container
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
12 apt-get install -y ca-certificates dns-root-data; \ |
|
7bfd6db52528
tools/build-env: Tools for building and testing in a container
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
13 apt-get install -y lua-bit32 || true; \ |
|
7bfd6db52528
tools/build-env: Tools for building and testing in a container
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
14 apt-get install -y lua-busted || true; \ |
|
7bfd6db52528
tools/build-env: Tools for building and testing in a container
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
15 apt-get install -y lua-check || true; \ |
|
7bfd6db52528
tools/build-env: Tools for building and testing in a container
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
16 apt-get install -y lua-readline || true; \ |
|
7bfd6db52528
tools/build-env: Tools for building and testing in a container
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
17 apt-get install -y lua-unbound || true; \ |
|
7bfd6db52528
tools/build-env: Tools for building and testing in a container
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
18 update-alternatives --set lua-interpreter /usr/bin/lua5.4 || true \ |
|
7bfd6db52528
tools/build-env: Tools for building and testing in a container
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
19 apt-get clean |
|
7bfd6db52528
tools/build-env: Tools for building and testing in a container
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
20 |
|
7bfd6db52528
tools/build-env: Tools for building and testing in a container
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
21 # Place this file in an empty directory and build the image with |
|
7bfd6db52528
tools/build-env: Tools for building and testing in a container
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
22 # podman build . -t prosody.im/build-env |
|
7bfd6db52528
tools/build-env: Tools for building and testing in a container
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
23 # |
|
7bfd6db52528
tools/build-env: Tools for building and testing in a container
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
24 # Substituting podman for docker should work, where that is what's available. |
|
7bfd6db52528
tools/build-env: Tools for building and testing in a container
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
25 # |
|
7bfd6db52528
tools/build-env: Tools for building and testing in a container
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
26 # Then in a source directory, run: |
|
7bfd6db52528
tools/build-env: Tools for building and testing in a container
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
27 # podman run -it --rm -v "$PWD:$PWD" -w "$PWD" --entrypoint /bin/bash \ |
|
7bfd6db52528
tools/build-env: Tools for building and testing in a container
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
28 # --userns=keep-id --network host prosody.im/build-env |
|
7bfd6db52528
tools/build-env: Tools for building and testing in a container
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
29 # |
|
7bfd6db52528
tools/build-env: Tools for building and testing in a container
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
30 # In the resulting environment everything required to compile and run prosody |
|
7bfd6db52528
tools/build-env: Tools for building and testing in a container
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
31 # is available, so e.g. `./configure; make; ./prosody` should Just Work! |