101 Commits

Author SHA1 Message Date
Kim Alvefur 4425fae939 configs: Coerce use_dane to boolean to avoid error 2026-03-06 13:13:06 +01:00
Kim Alvefur 6270bc329f Allow overriding DNS resolver
Nice to have on its own, but also useful to point at a DNSSEC-capable
resolver.
2026-03-03 20:23:03 +01:00
Kim Alvefur 370bca28c0 Add option to turn on DANE
Nice to have, especially with the recent Let's Encrypt debacle
2026-03-03 20:21:59 +01:00
Kim Alvefur fddb859136 Dockerfile: Explicitly add ca-certificates to fix TLS verification
Must have been implicitly depended on by something before
2026-03-03 17:54:37 +01:00
Kim Alvefur 348231e50b Dockerfile: Include Bootstrap4 and jQuery to ease enabling web invites
Suggested in the chat
2026-02-27 16:22:02 +01:00
Kim Alvefur fc3d7b920c Dockerfile: Change default package name to current stable branch 2026-02-27 16:21:33 +01:00
Kim Alvefur 1248e97f0c Switch base images to Debian 13 "trixie" 2026-02-27 16:08:29 +01:00
Kim Alvefur 3e85e9d2b6 Dockerfile: Switch to modern way of adding Prosody repo
60MB image size reduction
2026-02-27 16:03:53 +01:00
Matthew Wild 36fb07b2d4 Merge pull request #79 from joelpurra/patch-1
Link to official, up-to-date Docker Hub image: prosodyim/prosody
2026-02-10 14:39:21 +00:00
Joel Purra dc8600770a Link to official, up-to-date Docker Hub image: prosodyim/prosody
- Official, automated image builds are published as `prosodyim/prosody` on Docker Hub.
- This commit updates links to the published image in `README.md`.
- Still mentioning the outdated `prosody/prosody` image, because they are both official accounts but have confusing naming.
- Adding or updating other documentation would also be helpful.
  - The information page(s) for both Docker Hub images.
  - Links to the outdated Docker Hub image, for example in the Github repository sidebar information.
- Links to alternative `Dockerfile` implementations are moved below the documentation for this repository.

Closes #72.

Usage example:

```shell
docker image pull prosodyim/prosody:13.0

podman image pull docker.io/prosodyim/prosody:13.0
```

See

- https://github.com/prosody/prosody-docker/issues/72
- https://hub.docker.com/r/prosodyim/prosody
- https://hub.docker.com/r/prosody/prosody
2026-02-10 14:22:37 +01:00
Kim Alvefur ba105e7dee Fix splitting of PROSODY_COMPONENTS
Problem is that the code appears to expect multiple returns from the
`_split()` function but it returns an array, so we unpack that
presumably 2-item array into the parts expected.

Fixes #77
2025-04-21 19:50:21 +02:00
Kim Alvefur d5987023e2 Update configs for deprecation of direct Lua API usage 2025-02-17 17:04:57 +01:00
Matthew Wild 601945cb85 Dockerfile: Add BUILD_ID build argument
This can be used to break the cache when we know the upstream package has
changed. In CI we will probably just put the build number here.

Even though it is not currently exposed anywhere, it is available as an
environment variable in all RUN commands following the ARG. This should be
enough to avoid reusing cached layers between builds.
2025-02-18 12:27:36 +00:00
Kim Alvefur 8ede81d357 Update README for new version of Dockerfile 2025-02-15 16:36:55 +01:00
Kim Alvefur 11f3255946 Fix mistake with config for file share global quota 2025-02-15 16:24:47 +01:00
Kim Alvefur 3683ab91cc configs: Fix mistake in 46201ee 2025-02-15 16:23:56 +01:00
Kim Alvefur 9e7be12bec Update reference to Debian version
In order to match current Dockerfile
2025-02-15 15:43:32 +01:00
Kim Alvefur 438bb3e002 Remove 0.11 config, it has reached EOL 2025-02-15 15:42:45 +01:00
Kim Alvefur cbc0f60ab2 configs: Create config for 13.0 as copy of trunk config
Needed to start producing 13.0 docker images
2025-02-15 15:34:17 +01:00
Kim Alvefur 46201eefc1 configs/trunk: Use new array append feature to simplify 2025-02-15 15:32:06 +01:00
Kim Alvefur 8ed20cbe8f Dockerfile: Switch to Lua 5.4 for improved performance
Prosody on Lua 5.4 on Debian 12 should be well tested by now
2025-02-15 15:29:51 +01:00
Matthew Wild d15c46949a Move ng/* to top-level, replacing old build files 2025-02-13 18:15:55 +00:00
Kim Alvefur 74286f0b2b ng: Update base image to Debian 12
Way overdue since we stopped supporting Debian 11 when it reached
(non-LTS) EOL on 2024-08-14
2025-01-24 14:00:58 +01:00
Kim Alvefur 0581c684a5 ng: Fix bug that would create a VirtualHost""
Seems * in patterns behave differently before Lua 5.3

Thanks to tarneo for reporting this issue
2023-12-02 17:54:53 +01:00
Kim Alvefur aa886a0b49 ng: Add FIXME wrt failure to start if data directory owned by root 2023-03-21 18:34:20 +01:00
Kim Alvefur 1c79b49c74 ng: Install Lua C headers as workaround for luarocks/luarocks#1275 2023-03-21 18:33:20 +01:00
Kim Alvefur bfa98dcb30 ng: Apply previous two changes to 0.12 config as well 2023-02-24 14:21:49 +01:00
Kim Alvefur 2a8ec06934 ng: Allow specifying statistics interval
Recommended for Prometheus / OpenMetrics which will probably be the
primary use. In fact, why not just enable and hardcode
mod_http_openmetrics?
2023-01-14 00:28:27 +01:00
Kim Alvefur 84a6c25e5d ng: Set selected interpreter as default in shell
Otherwise it's just going to somehow install Lua 5.1 and then use that
because why not?
2023-01-14 00:25:28 +01:00
Kim Alvefur 87c60bc5d9 ng: Use console logs
This enables color if output is a terminal
2023-01-14 00:22:19 +01:00
Matthew Wild d9e98d73cf ng: Ensure all environment variables have 'PROSODY_' prefix for consistency 2022-12-14 15:52:54 +00:00
Matthew Wild 76fa083967 ng: add config for prosody-trunk 2022-12-14 14:46:53 +00:00
Kim Alvefur 2f14fcaf8b ng: Add lua-readline so prosodyctl shell is nicer to use 2022-12-13 18:46:26 +01:00
Matthew Wild 25f7395352 ng: New experimental Dockerfile based on apt-installing prosody 2022-12-10 16:17:35 +00:00
Alexander Dahl a5e773d9b6 Fix signal handling and allow graceful shutdown
Although cc88073a79 ("Fix signal handling") fixed the signal handling
and signals don't end up in `entrypoint.sh` anymore, there's still no
clean graceful shutdown. The reason is runuser. It runs as PID 1 and
prosody only runs as child process. A SIGTERM sent to runuser lets
runuser forward SIGTERM to the child process. However it does not wait,
but send SIGKILL right after it. (Confirmed by looking at runuser source
code in util-linux.)

The output on `docker stop [prosodycontainer]` is therefore:

    Session terminated, killing shell...mod_posix                                warn       Received SIGTERM
    portmanager                              info   Deactivated service 'c2s'
     ...killed.

The additional messages in between prosody log output come from runuser.
This is obviously no graceful shutdown.

Because prosody fordibs running as uid 0 (root) we have to run it as
unpriviledged user. The docker best practices recommend to use *gosu*
and gosu lists some alternatives.  Instead of installing gosu to the
image, we use *setpriv* from the already installed util-linux now. The
version in Debian buster, on which the prosody image is based currently,
is recent enough to already contain setpriv.

After that, prosody itself runs with PID 1, but as unpriviledged user
now, and the output of `docker stop` looks like this:

    mod_posix                                warn   Received SIGTERM
    portmanager                              info   Deactivated service 'c2s'
    general                                  info   Shutting down...
    general                                  info   Shutdown status: Cleaning up
    general                                  info   Shutdown complete

Link: https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#entrypoint
Signed-off-by: Alexander Dahl <post@lespocky.de>
2021-03-27 16:58:09 +01:00
Alexander Dahl 83556a4c5a Revert "Use tini as PID 1 inside the container"
This reverts commit 31d6d84433.

While tini successfully forwards signals, this leads to `runuser`
killing prosody now. The container does terminate in 10 seconds, so
Docker is happy and you could argue that actually fixes #68, but it's no
graceful shutdown. The revert is done because it's easier to apply a
real fix without tini.
2021-03-27 16:58:09 +01:00
Kim Alvefur 52cd642d38 Remove inaccurate comment
It says "from debian" right beneath it!
2021-03-20 12:32:20 +01:00
Jonas Schäfer 31d6d84433 Use tini as PID 1 inside the container
tini [1] is a minimalistic PID 1 process. It correctly handles
the special jobs which PID 1 (or a reaper process in general)
needs to take care of in addition to correctly processing the
relevant signals.

Fixes #68.

   [1]: https://github.com/krallin/tini
2021-03-20 12:30:27 +01:00
selurvedu d627c29eab Fix minor shellcheck warnings 2021-01-29 17:20:34 +01:00
selurvedu 0555dc16c9 Fix mod_posix error if prosody user ID was altered
This fixes the following mod_posix error:

Couldn't write pidfile at /var/run/prosody/prosody.pid;
/var/run/prosody/prosody.pid: Permission denied
2021-01-29 17:20:34 +01:00
Matthew Wild 3a21cd2c21 Merge pull request #65 from goffi-contrib/signal_fix
Fix signal handling
2020-10-12 06:55:37 +01:00
Jérôme Poisson cc88073a79 Fix signal handling
This patch add `exec` to replace the shell running the `entrypoint.sh`
script by Prosody executable.

This allows Prosody to catch and handle correctly signals, notably
SIGTERM and SIGINT. Without it, Docker can't stop correctly the
container, resulting in a 10 s delay before it kills it.
2020-10-10 21:20:17 +02:00
Kim Alvefur 4878e32010 Remove our repo
Debian versions of dependencies should be fine now
2020-02-14 00:50:18 +01:00
Kim Alvefur 7a6b4df1a2 README: Update for base image update 2020-02-14 00:47:17 +01:00
Matthew Wild 90963038ee Merge pull request #62 from prosody/dynamic-uid
Run with same UID as datadir owner
1.6.0
2020-02-13 11:18:06 +00:00
Kim Alvefur 95a9d24b76 Run with same UID as datadir owner
This should fix problems with owner/uid mismatch when an existing
prosody data directory is mounted into the container

Closes #39
2020-02-13 01:10:36 +01:00
Kim Alvefur 47d22ada68 Start prosody with the new flag to force foreground operation 2020-02-13 01:08:16 +01:00
Kim Alvefur 80c6ffc362 Install procps, dependency of recent packages 2020-02-12 19:55:34 +01:00
Kim Alvefur f2c1afeabe Add libicu needed by trunk nightly builds (fixes #59) 2020-02-12 19:52:19 +01:00
Kim Alvefur 3a47a006bc Switch base image to Debian 10 (closes #61)
OpenSSL version with TLS 1.3 support
2020-02-12 19:32:28 +01:00