Use sudo, add luarocks, and remove deprecated config
This commit is contained in:
parent
2b1533cb0e
commit
645e890730
2 changed files with 7 additions and 3 deletions
|
@ -37,13 +37,16 @@ RUN apt-get update \
|
|||
lua5.2 \
|
||||
lua5.3 \
|
||||
lua5.4 \
|
||||
luarocks \
|
||||
openssl \
|
||||
prosody \
|
||||
sudo \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN update-alternatives --set lua-interpreter /usr/bin/lua5.4
|
||||
|
||||
# Configure prosody
|
||||
RUN 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 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
|
||||
|
||||
|
|
|
@ -18,4 +18,5 @@ if [[ "$LOCAL" && "$PASSWORD" && "$DOMAIN" ]]; then
|
|||
prosodyctl register "$LOCAL" "$DOMAIN" "$PASSWORD"
|
||||
fi
|
||||
|
||||
exec setpriv --reuid=prosody --regid=prosody --init-groups "$@"
|
||||
pushd /var/run/prosody
|
||||
exec sudo -Eu prosody -- "$@"
|
||||
|
|
Loading…
Reference in a new issue