-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
57 lines (45 loc) · 1.75 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
FROM debian:stretch-slim
MAINTAINER Alexey Vakulich <alexey.vakulich@gmail.com>
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
mercurial \
adduser \
ca-certificates \
wget \
gnupg \
build-essential \
lua5.1 \
liblua5.1-dev \
libidn11-dev \
libssl-dev \
lua-filesystem \
lua-expat \
lua-socket \
lua-sec \
lua-bitop \
lua-dbi-sqlite3
RUN echo deb http://packages.prosody.im/debian stretch main | tee -a /etc/apt/sources.list
RUN wget --no-check-certificate \
https://prosody.im/files/prosody-debian-packages.key -O- | apt-key add -
ARG prosody_version=0.11.2
ENV PROSODY_VERSION $prosody_version
RUN wget https://prosody.im/downloads/source/prosody-${PROSODY_VERSION}.tar.gz
RUN tar -xzf prosody-${PROSODY_VERSION}.tar.gz -C /usr/src/
RUN rm prosody-${PROSODY_VERSION}.tar.gz
WORKDIR /usr/src/prosody-$PROSODY_VERSION
RUN ${PWD}/configure --prefix=/usr --sysconfdir=/etc/prosody --datadir=/var/lib/prosody
RUN make && make install
RUN hg clone https://hg.prosody.im/prosody-modules/ /opt/prosody-modules-available/
ADD config/prosody.cfg.lua /etc/prosody/prosody.cfg.lua
ADD config/conf.d/ /etc/prosody/conf.d/
ADD config/vhost.d/ /etc/prosody/vhost.d/
RUN useradd -rs /bin/false prosody \
&& mkdir /var/run/prosody/ \
&& chown -R prosody:prosody /etc/prosody/ /var/lib/prosody/ /var/run/prosody/ /opt/prosody-modules-* \
&& chmod -R 760 /etc/prosody/ /var/lib/prosody/ /var/run/prosody/ /opt/prosody-modules-*
COPY ./entrypoint.sh /entrypoint.sh
RUN chmod 755 /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
EXPOSE 80 443 5222 5269 5347 5280 5281
USER prosody:prosody
CMD ["prosody"]