-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
76 lines (67 loc) · 2.03 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#
# Dockerfile to build a docker image from Openfire Master
#
# Dave Cridland <[email protected]>
# Copyright 2017 Surevine Ltd
#
# Interesting ports: 5222 (C2S) 5269 (S2S) 9090 (Admin) 9191 (Admin Secure)
# Use Ubuntu 16.04 LTS. Because.
FROM ubuntu:xenial
MAINTAINER Dave Cridland <[email protected]>
# Set environment variables
ENV DEBIAN_FRONTEND noninteractive
ENV JAVA_HOME /usr/lib/jvm/java-1.8.0-openjdk-amd64
ENV DATABASE_HOST ""
ENV DATABASE_NAME ""
ENV DATABASE_USER ""
ENV DATABASE_PASSWD ""
# Update system
RUN apt-get update && apt-get dist-upgrade -y && apt-get autoremove -y && apt-get clean
# Install dependencies.
RUN apt-get install ant git openjdk-8-jdk-headless debhelper dpkg locales libc-bin default-jdk patchutils cdbs -y
# Arguments::
# git repo (your local, or the default Ignite's)
ARG OPENFIRE_GIT=https://github.com/igniterealtime/openfire
ARG OPENFIRE_GIT_COMMIT=master
ARG OPENFIRE_PLUGINS="dbaccess websocket"
# Clone sources
WORKDIR /var/tmp/src
RUN git clone $OPENFIRE_GIT
RUN cd openfire && \
git fetch && \
git checkout $OPENFIRE_GIT_COMMIT && \
make && \
make JAVA_HOME=${JAVA_HOME} dpkg && \
cd /var/tmp/src/openfire/target/release/debian && \
dpkg -i openfire*.deb && \
cd /var/tmp/src/openfire && \
make plugins && \
for plugin in $OPENFIRE_PLUGINS; do \
cp ./target/openfire/plugins/${plugin}.jar /var/lib/openfire/plugins/; \
done && \
cd /var/tmp && \
rm -rf src && \
touch /.firstboot.tmp
# Ports:
EXPOSE 5222
# XMPP C2S, StartTLS
EXPOSE 5223
# XMPP C2S, immediate-mode TLS
EXPOSE 5269
# XMPP S2S (federation)
EXPOSE 9090
# HTTP Admin Console
EXPOSE 9191
# HTTPS Admin Console
EXPOSE 7070
# HTTP BOSH binding
EXPOSE 7443
# HTTPS BOSH binding
COPY launch-openfire.sh /sbin/launch-openfire.sh
RUN chmod 0755 /sbin/launch-openfire.sh && \
mv /etc/openfire /etc/openfire--SAVE && \
mv /var/lib/openfire /var/lib/openfire--SAVE && \
rm -rf /var/log/openfire
COPY openfire-postgres.xml /etc/openfire--SAVE/openfire-postgres.xml
VOLUME /var/cache/openfire-data
ENTRYPOINT ["/sbin/launch-openfire.sh"]