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-0.11/Dockerfile

87 lines
2.8 KiB
Text
Raw Normal View History

2019-02-02 16:57:49 +01:00
FROM alpine:edge
2017-12-09 16:46:17 +01:00
LABEL maintainer "J. Elfring <devops@elfrinjo.de>"
## Install Packages
RUN apk add --no-cache \
--update \
ca-certificates \
curl \
2019-02-02 16:57:49 +01:00
libcrypto1.1 \
2017-12-09 16:46:17 +01:00
libidn \
2018-11-22 18:15:06 +01:00
lua5.2 \
lua5.2-expat \
lua5.2-filesystem \
lua5.2-sec \
lua5.2-socket \
openssl
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 set -x \
##
## Build Environment
&& apk add --update \
--no-cache \
--virtual .build-deps \
alpine-sdk \
libidn-dev \
linux-headers \
lua5.2-busted \
lua5.2-dev \
openssl-dev \
2018-11-22 18:15:06 +01:00
&& ln -s /usr/bin/busted-5.2 /usr/local/bin/busted \
##
## Prosody
&& curl --silent --output /prosody-trunk.tar.gz "https://hg.prosody.im/trunk/archive/0.11.tar.gz" \
&& mkdir /prosody-src \
&& cd /prosody-src \
&& tar xzf /prosody-trunk.tar.gz --strip 1 \
2017-12-09 16:46:17 +01:00
&& ./configure --no-example-certs \
--cflags='-fPIC -Wall -std=c99 -pedantic -DWITHOUT_MALLINFO' \
2017-12-09 16:46:17 +01:00
&& make \
&& make test \
&& make install \
&& cd / \
##
## Prosody Community Modules
&& curl --silent --output /prosody-modules.tar.gz "https://hg.prosody.im/prosody-modules/archive/default.tar.gz" \
&& mkdir /usr/local/lib/prosody-community-modules \
&& cd /usr/local/lib/prosody-community-modules \
&& tar xzf /prosody-modules.tar.gz --strip 1 \
&& cd mod_admin_web/admin_web \
&& ./get_deps.sh \
##
## Cleanup
2017-12-09 16:46:17 +01:00
&& rm -rf /prosody-src \
2019-05-30 23:06:04 +02:00
&& rm -f /prosody-trunk.tar.gz \
&& rm -f /prosody-modules.tar.gz \
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
## Some static files (e.g. for the invite module)
RUN mkdir /usr/local/var/lib/www \
&& mkdir -p /usr/local/var/lib/javascript/bootstrap4/css \
&& curl --silent --output /usr/local/var/lib/javascript/bootstrap4/css/bootstrap.min.css \
"https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" \
&& mkdir -p /usr/local/var/lib/javascript/bootstrap4/js \
&& curl --silent --output /usr/local/var/lib/javascript/bootstrap4/js/bootstrap.min.js \
"https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js" \
&& mkdir -p /usr/local/var/lib/javascript/jquery \
&& curl --silent --output /usr/local/var/lib/javascript/jquery/jquery.min.js \
"https://code.jquery.com/jquery-3.5.1.min.js"
## Add Default config
2017-12-09 16:46:17 +01:00
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"]