prosody: use a 2-stage build
This greatly simplifies the cleanup so we don't leave unneeded packages behind.
This commit is contained in:
parent
613c26c11b
commit
1d428a8440
|
@ -1,4 +1,22 @@
|
|||
ARG JITSI_REPO=jitsi
|
||||
|
||||
FROM ${JITSI_REPO}/base as builder
|
||||
|
||||
RUN \
|
||||
apt-dpkg-wrap apt-get update \
|
||||
&& apt-dpkg-wrap apt-get install -y \
|
||||
lua5.2 \
|
||||
liblua5.2-dev \
|
||||
libsasl2-dev \
|
||||
libssl1.0-dev \
|
||||
luarocks \
|
||||
git \
|
||||
gcc \
|
||||
&& luarocks install cyrussasl 1.1.0-1 \
|
||||
&& luarocks install lua-cjson 2.1.0-1 \
|
||||
&& luarocks install luajwtjitsi 1.3-7 \
|
||||
&& luarocks install net-url 0.9-1
|
||||
|
||||
FROM ${JITSI_REPO}/base
|
||||
|
||||
ADD https://prosody.im/files/prosody-debian-packages.key /tmp/prosody.key
|
||||
|
@ -14,28 +32,10 @@ RUN \
|
|||
sasl2-bin \
|
||||
libsasl2-modules-ldap \
|
||||
lua-basexx \
|
||||
liblua5.2-dev \
|
||||
libsasl2-dev \
|
||||
libssl1.0-dev \
|
||||
luarocks \
|
||||
git \
|
||||
gcc \
|
||||
patch \
|
||||
&& apt-dpkg-wrap apt-get install -t stretch-backports -y \
|
||||
lua-ldap \
|
||||
lua-sec \
|
||||
&& luarocks install cyrussasl 1.1.0-1 \
|
||||
&& luarocks install lua-cjson 2.1.0-1 \
|
||||
&& luarocks install luajwtjitsi 1.3-7 \
|
||||
&& luarocks install net-url 0.9-1 \
|
||||
&& apt-dpkg-wrap apt-get remove --purge -y \
|
||||
git \
|
||||
gcc \
|
||||
luarocks \
|
||||
libsasl2-dev \
|
||||
libssl1.0-dev \
|
||||
liblua5.2-dev \
|
||||
&& apt-dpkg-wrap apt-get autoremove --purge -y \
|
||||
&& apt-cleanup \
|
||||
&& rm -rf /etc/prosody
|
||||
|
||||
|
@ -51,6 +51,9 @@ RUN patch -d /usr/lib/prosody/modules/muc -p0 < /prosody-plugins/muc_owner_allow
|
|||
|
||||
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 5269 5347 5280
|
||||
|
||||
VOLUME ["/config", "/prosody-plugins-custom"]
|
||||
|
|
Loading…
Reference in New Issue