48 lines
2.4 KiB
Docker
48 lines
2.4 KiB
Docker
FROM reg.zknt.org/zknt/alpine:3.17 as builder
|
|
|
|
ARG VERSION
|
|
ENV VERSION=0.12.2
|
|
ENV LUA_VERSION=5.3
|
|
|
|
RUN set -eo pipefail; \
|
|
apk add --no-cache curl gnupg lua${LUA_VERSION} lua${LUA_VERSION}-dev make alpine-sdk lua-bitop lua${LUA_VERSION}-dbi-mysql lua${LUA_VERSION}-dbi-postgresql lua${LUA_VERSION}-dbi-sqlite3 lua-expat lua-filesystem lua-sec lua-socket lua${LUA_VERSION}-lzlib libidn-dev libressl-dev linux-headers icu-dev icu-data-full
|
|
RUN set -xeo pipefail; \
|
|
curl -LO https://prosody.im/downloads/source/prosody-${VERSION}.tar.gz &&\
|
|
curl -LO https://prosody.im/downloads/source/prosody-${VERSION}.tar.gz.asc &&\
|
|
#gpg --keyserver keys.openpgp.org --receive 32A9EDDE3609931EB98CEAC315907E8E7BDD6BFE &&\
|
|
#gpg --verify prosody-${VERSION}.tar.gz.asc prosody-${VERSION}.tar.gz &&\
|
|
tar xvzf prosody-${VERSION}.tar.gz
|
|
WORKDIR prosody-${VERSION}
|
|
RUN set -xeo pipefail; \
|
|
./configure &&\
|
|
make &&\
|
|
make install &&\
|
|
# now fetch community modules
|
|
cd &&\
|
|
apk add --no-cache mercurial &&\
|
|
hg clone 'https://hg.prosody.im/prosody-modules/' prosody-modules
|
|
|
|
FROM reg.zknt.org/zknt/alpine:3.17
|
|
ENV LUA_VERSION=5.3
|
|
ARG VERSION
|
|
ARG DATE
|
|
COPY --from=builder /usr/local /usr/local
|
|
COPY --from=builder /root/prosody-modules/mod_vcard_muc /community_modules/mod_vcard_muc
|
|
COPY --from=builder /root/prosody-modules/mod_smacks /community_modules/mod_smacks
|
|
COPY --from=builder /root/prosody-modules/mod_cloud_notify /community_modules/mod_cloud_notify
|
|
COPY --from=builder /root/prosody-modules/mod_bookmarks /community_modules/mod_bookmarks
|
|
COPY --from=builder /root/prosody-modules/mod_http_upload /community_modules/mod_http_upload
|
|
COPY --from=builder /root/prosody-modules/mod_http_upload_external /community_modules/mod_http_upload_external
|
|
COPY --from=builder /root/prosody-modules/mod_turncredentials /community_modules/mod_turncredentials
|
|
RUN set -eo pipefail;\
|
|
apk add --no-cache gettext ca-certificates libidn lua${LUA_VERSION} lua-bitop lua-sec libressl lua-filesystem lua-expat lua-socket icu icu-data-full &&\
|
|
addgroup -g 9999 prosody &&\
|
|
adduser -D -G prosody -u 9999 prosody &&\
|
|
chown -R prosody:prosody /usr/local/etc/prosody /usr/local/var/lib/prosody
|
|
COPY prosody.cfg.template /prosody.cfg.template
|
|
COPY entrypoint.sh /entrypoint.sh
|
|
USER prosody
|
|
VOLUME /usr/local/var/lib/prosody /usr/local/etc/prosody/certs
|
|
EXPOSE 5269 5222 5223
|
|
ENTRYPOINT /entrypoint.sh
|
|
LABEL version.prosody=$VERSION build.date=$DATE
|