grim/containers/prosody

Install everything from source

2019-10-21, Gary Kramlich
480c4201b601
Parents 34d579ea41fd
Children ea16a2fbbd61
Install everything from source
  • +43 -3
    Dockerfile
  • --- a/Dockerfile Wed Oct 16 02:09:29 2019 -0500
    +++ b/Dockerfile Mon Oct 21 21:57:42 2019 -0500
    @@ -4,13 +4,51 @@
    RUN set -ex && \
    apt-get update && \
    apt-get install -y --no-install-recommends \
    - lua-dbi-postgresql lua-event \
    - prosody prosody-modules \
    + build-essential ca-certificates pkg-config wget \
    + lua5.2 liblua5.2-dev \
    + libidn11-dev libidn2-dev libssl-dev \
    + lua-bitop lua-dbi-postgresql lua-event lua-expat \
    + lua-filesystem lua-sec lua-socket \
    vim procps \
    && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists
    +# create the prosody user and it's home dir
    +RUN set -ex && \
    + useradd -u 101 -d /var/lib/prosody -U -m -r -s /bin/false prosody
    +
    +# download and install prosody from an hg archive
    +RUN set -ex && \
    + cd /tmp && \
    + mkdir prosody && \
    + wget https://hg.prosody.im/trunk/archive/tip.tar.gz && \
    + tar -C prosody --strip-components=1 -zxf tip.tar.gz && \
    + rm -f tip.tar.gz && \
    + cd prosody && \
    + ./configure && \
    + make -j $(nproc) && \
    + make install && \
    + cd .. && \
    + rm -rf prosody && \
    + cd /etc && \
    + ln -s /usr/local/etc/prosody prosody && \
    + mkdir /etc/prosody/conf.d
    +
    +# download and install prosody-modules from an hg archive
    +RUN set -ex && \
    + cd /tmp && \
    + wget https://hg.prosody.im/prosody-modules/archive/tip.tar.gz && \
    + tar -C /usr/local/lib/prosody/modules --strip-components=1 -zxf tip.tar.gz && \
    + rm -rf tip.tar.gz
    +
    +# download and install the prosody jetbrains hub auth module
    +RUN set -ex && \
    + cd /tmp && \
    + wget https://hg.sr.ht/~grim/prosody_mod_auth_jetbrains_hub/archive/tip.tar.gz && \
    + tar -C /usr/local/lib/prosody/modules --strip-components=1 -zxf tip.tar.gz && \
    + rm -rf tip.tar.gz
    +
    # set some defaults in the config file (logging stolen from prosody/prosody)
    RUN set -ex && \
    perl -i -pe 'BEGIN{undef $/;} s/^log = {.*?^}$/log = {\n {levels = {min = "info"}, to = "console"};\n}/smg' /etc/prosody/prosody.cfg.lua && \
    @@ -18,7 +56,9 @@
    sed -i 's/--"mam"/"mam"/' /etc/prosody/prosody.cfg.lua && \
    sed -i 's/--"csi_simple"/"csi_simple"/' /etc/prosody/prosody.cfg.lua && \
    sed -i 's/--"bosh"/"bosh"/' /etc/prosody/prosody.cfg.lua && \
    - sed -i 's/VirtualHost "localhost"/--VirtualHost "localhost"/' /etc/prosody/prosody.cfg.lua
    + grep -i virtualhost /etc/prosody/prosody.cfg.lua && \
    + sed -i 's/VirtualHost "localhost"/--VirtualHost "localhost"/' /etc/prosody/prosody.cfg.lua && \
    + echo 'pidfile="/run/prosody/prosody.pid";' >> /etc/prosody/prosody.cfg.lua
    RUN set -ex && \
    mkdir -p /run/prosody/ && \