diff --git a/Dockerfile b/Dockerfile index c73ecb4..cc55d2f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/entrypoint.sh b/entrypoint.sh index 81b16c5..011647d 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -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 -- "$@"