12 Commits

Author SHA1 Message Date
Matthew Wild 90963038ee Merge pull request #62 from prosody/dynamic-uid
Run with same UID as datadir owner
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
Kim Alvefur e0c2334d2a Merge pull request #56 from Zash/shellcheck
Quote variables in entrypoint.sh
2019-03-31 18:47:34 +02:00
Kim Alvefur 8c4170e7d9 entrypoint.sh: Quote variables [shellcheck] 2019-03-16 19:19:37 +01:00
Matthew Wild 1fa2fb60ce Ensure prosody package key is world-readable (so apt user can read it) 2019-01-14 12:19:03 +00:00
Matthew Wild 21b5e2d19b Create directory for pidfile (usually created by init script) 2019-01-14 11:43:13 +00:00
Matthew Wild 4de30316aa Add lua5.2 for compatibility with 0.11 packages 2019-01-14 11:42:51 +00:00
Matthew Wild a60be883e9 Fix README to state new distribution base 2019-01-14 11:31:41 +00:00
3 changed files with 14 additions and 7 deletions
+8 -3
View File
@@ -3,20 +3,23 @@
# Based on ubuntu
################################################################################
FROM debian:9
FROM debian:10
MAINTAINER Prosody Developers <developers@prosody.im>
# Some dependencies in stretch are not suitable for Prosody 0.11.x, so add our repo
RUN echo "deb http://packages.prosody.im/debian stretch main" > /etc/apt/sources.list.d/prosody.list
ADD prosody_packages.gpg /etc/apt/trusted.gpg.d/prosody.gpg
RUN chmod a+r /etc/apt/trusted.gpg.d/prosody.gpg
# Install dependencies
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
lsb-base \
procps \
adduser \
libidn11 \
libicu63 \
libssl1.1 \
lua-bitop \
lua-dbi-mysql \
@@ -29,6 +32,7 @@ RUN apt-get update \
lua-socket \
lua-zlib \
lua5.1 \
lua5.2 \
openssl \
ca-certificates \
ssl-cert \
@@ -40,11 +44,12 @@ RUN dpkg -i /tmp/prosody.deb \
&& sed -i '1s/^/daemonize = false;\n/' /etc/prosody/prosody.cfg.lua \
&& perl -i -pe 'BEGIN{undef $/;} s/^log = {.*?^}$/log = {\n {levels = {min = "info"}, to = "console"};\n}/smg' /etc/prosody/prosody.cfg.lua
RUN mkdir -p /var/run/prosody && chown prosody:prosody /var/run/prosody
COPY ./entrypoint.sh /entrypoint.sh
RUN chmod 755 /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
EXPOSE 80 443 5222 5269 5347 5280 5281
USER prosody
ENV __FLUSH_LOG yes
CMD ["prosody"]
CMD ["prosody", "-F"]
+1 -1
View File
@@ -16,7 +16,7 @@ For images please see here: [Prosody on Docker](https://hub.docker.com/r/prosody
It works by copying in a recently built `deb` file and running the install on the system.
Docker images are built off an __Ubuntu 14.04 LTS__ base.
Docker images are built off an __Debian 9 (stretch)__ base.
```bash
docker run -d --name prosody -p 5222:5222 prosody/prosody
+5 -3
View File
@@ -1,13 +1,15 @@
#!/bin/bash
set -e
usermod -u "$(stat -c %u /var/lib/prosody/.)" prosody
if [[ "$1" != "prosody" ]]; then
exec prosodyctl $*
exec prosodyctl "$@"
exit 0;
fi
if [ "$LOCAL" -a "$PASSWORD" -a "$DOMAIN" ] ; then
prosodyctl register $LOCAL $DOMAIN $PASSWORD
prosodyctl register "$LOCAL" "$DOMAIN" "$PASSWORD"
fi
exec "$@"
runuser -u prosody -- "$@"