83556a4c5a
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.
49 lines
1.4 KiB
Docker
49 lines
1.4 KiB
Docker
################################################################################
|
|
# Build a dockerfile for Prosody XMPP server
|
|
################################################################################
|
|
|
|
FROM debian:10
|
|
|
|
MAINTAINER Prosody Developers <developers@prosody.im>
|
|
|
|
# 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 \
|
|
lua-dbi-postgresql \
|
|
lua-dbi-sqlite3 \
|
|
lua-event \
|
|
lua-expat \
|
|
lua-filesystem \
|
|
lua-sec \
|
|
lua-socket \
|
|
lua-zlib \
|
|
lua5.1 \
|
|
lua5.2 \
|
|
openssl \
|
|
ca-certificates \
|
|
ssl-cert \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Install and configure prosody
|
|
COPY ./prosody.deb /tmp/prosody.deb
|
|
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
|
|
ENV __FLUSH_LOG yes
|
|
CMD ["prosody", "-F"]
|