Skip to content

Commit

Permalink
prosody: simplify container build
Browse files Browse the repository at this point in the history
We can now use the Lua libraries packaged in Debian, thus removing the
need for a 2-stage build and manual package coppying.
  • Loading branch information
saghul committed Aug 5, 2022
1 parent e05a9c2 commit b670959
Showing 1 changed file with 3 additions and 25 deletions.
28 changes: 3 additions & 25 deletions prosody/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,6 @@
ARG JITSI_REPO=jitsi
ARG BASE_TAG=latest

FROM ${JITSI_REPO}/base:${BASE_TAG} as builder

RUN apt-dpkg-wrap apt-get update && \
apt-dpkg-wrap apt-get install -y \
build-essential \
lua5.4 \
liblua5.4-dev \
libsasl2-dev \
libssl-dev \
libreadline-dev \
git \
unzip \
wget && \
mkdir /tmp/luarocks && \
wget -qO - https://luarocks.github.io/luarocks/releases/luarocks-3.8.0.tar.gz | tar xfz - --strip-components 1 -C /tmp/luarocks && \
cd /tmp/luarocks && ./configure && make && make install && cd - && \
luarocks install cyrussasl 1.1.0-1 && \
luarocks install net-url 0.9-1 && \

This comment has been minimized.

Copy link
@Krisssssss

Krisssssss Aug 9, 2022

Why net-url is removed when is still used in prosody plugins?

https://github.com/jitsi/jitsi-meet/blob/master/resources/prosody-plugins/mod_muc_size.lua#L20

This comment has been minimized.

Copy link
@saghul

saghul Aug 9, 2022

Author Member

Ah bugger! Thanks for catching that! I guess we'll have a -2 release 😅

This comment has been minimized.

Copy link
@saghul

saghul Aug 10, 2022

Author Member

Release -2 contains a fix for this.

luarocks install luajwtjitsi 3.0-0

FROM ${JITSI_REPO}/base:${BASE_TAG}

LABEL org.opencontainers.image.title="Prosody IM"
Expand All @@ -42,14 +22,15 @@ RUN wget -qO /etc/apt/trusted.gpg.d/prosody.gpg https://prosody.im/files/prosody
sasl2-bin \
libsasl2-modules-ldap \
lua-basexx \
lua-cjson \
lua-cyrussasl \
lua-ldap \
lua-luaossl \
lua-sec \
lua-unbound && \
apt-dpkg-wrap apt-get -d install -y jitsi-meet-prosody && \
dpkg -x /var/cache/apt/archives/jitsi-meet-prosody*.deb /tmp/pkg && \
mv /tmp/pkg/usr/share/jitsi-meet/prosody-plugins /prosody-plugins && \
rm -f /prosody-plugins/token/util.lib.lua && \
wget -qO /prosody-plugins/token/util.lib.lua https://raw.githubusercontent.com/jitsi/jitsi-meet/46dd88c91b63988f516114daee65ff8995c74c56/resources/prosody-plugins/token/util.lib.lua && \
wget -qO /prosody-plugins/mod_auth_cyrus.lua https://hg.prosody.im/prosody-modules/raw-file/65438e4ba563/mod_auth_cyrus/mod_auth_cyrus.lua && \
wget -qO /prosody-plugins/sasl_cyrus.lua https://hg.prosody.im/prosody-modules/raw-file/65438e4ba563/mod_auth_cyrus/sasl_cyrus.lua && \
apt-cleanup && \
Expand All @@ -63,9 +44,6 @@ RUN wget -qO /etc/apt/trusted.gpg.d/prosody.gpg https://prosody.im/files/prosody

COPY rootfs/ /

COPY --from=builder /usr/local/lib/lua /usr/local/lib/lua
COPY --from=builder /usr/local/share/lua /usr/local/share/lua

EXPOSE 5222 5280

VOLUME ["/config", "/prosody-plugins-custom"]

0 comments on commit b670959

Please sign in to comment.