Archived
1
0
Fork 0
This repository has been archived on 2024-01-27. You can view files and clone it, but cannot push or open issues or pull requests.
dockerfiles/prosody/Dockerfile

54 lines
1.5 KiB
Text
Raw Normal View History

2018-11-22 18:15:06 +01:00
FROM alpine:3.8
2017-12-09 16:46:17 +01:00
LABEL maintainer "J. Elfring <devops@elfrinjo.de>"
## Install Packages
RUN apk add --no-cache \
--update \
libcrypto1.0 \
libidn \
2018-11-22 18:15:06 +01:00
lua5.2 \
lua5.2-expat \
lua5.2-filesystem \
lua5.2-sec \
lua5.2-socket
2017-12-09 16:46:17 +01:00
## Install build envirnoment, build and remove unneeded things
## This is done in one step to reduce image size
RUN apk add --update \
--no-cache \
--virtual .build-deps \
alpine-sdk \
mercurial \
2018-11-22 18:15:06 +01:00
libidn-dev \
2017-12-09 16:46:17 +01:00
linux-headers \
2018-11-22 18:15:06 +01:00
lua5.2-busted \
lua5.2-dev \
2017-12-09 16:46:17 +01:00
openssl-dev \
&& set -x \
2018-11-22 18:15:06 +01:00
&& ln -s /usr/bin/busted-5.2 /usr/local/bin/busted \
&& hg clone https://hg.prosody.im/0.11 /prosody-src \
2017-12-09 16:46:17 +01:00
&& cd /prosody-src \
&& ./configure --no-example-certs \
--cflags='-fPIC -Wall -std=c99 -pedantic -DWITHOUT_MALLINFO' \
&& make \
&& make test \
&& make install \
&& cd / \
&& rm -rf /prosody-src \
&& hg clone https://hg.prosody.im/prosody-modules/ /usr/local/lib/prosody-community-modules \
&& rm -rf /usr/local/lib/prosody-community-modules/.hg \
&& rm -rf /usr/local/lib/prosody-community-modules/.hgtags \
2018-11-22 18:15:06 +01:00
&& rm -f /usr/local/bin/busted \
2017-12-09 16:46:17 +01:00
&& apk del .build-deps
COPY ./assets/prosody.cfg.lua /usr/local/etc/prosody/prosody.cfg.lua
RUN chown daemon:daemon /usr/local/var/lib/prosody
2018-11-22 18:15:06 +01:00
EXPOSE 5000 5222 5269 5347 5280 5281
2017-12-09 16:46:17 +01:00
VOLUME ["/usr/local/etc/prosody", "/usr/local/var/lib/prosody"]
USER daemon
ENTRYPOINT ["/usr/local/bin/prosody"]