forked from igniterealtime/Openfire
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
32 lines (27 loc) · 1.22 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
FROM openjdk:8-jdk
COPY . /usr/src
RUN apt-get update -qq \
&& apt-get install -qqy maven \
&& cd /usr/src \
&& mvn package
FROM openjdk:8-jre
COPY --from=0 /usr/src/distribution/target/distribution-base /usr/local/openfire
COPY --from=0 /usr/src/build/docker/entrypoint.sh /sbin/entrypoint.sh
WORKDIR /usr/local/openfire
ENV OPENFIRE_USER=openfire \
OPENFIRE_DIR=/usr/local/openfire \
OPENFIRE_DATA_DIR=/var/lib/openfire \
OPENFIRE_LOG_DIR=/var/log/openfire
RUN apt-get update -qq \
&& apt-get install -yqq sudo \
&& adduser --disabled-password --quiet --system --home $OPENFIRE_DATA_DIR --gecos "Openfire XMPP server" --group openfire \
&& chmod 755 /sbin/entrypoint.sh \
&& chown -R openfire:openfire ${OPENFIRE_DIR} \
&& mv ${OPENFIRE_DIR}/conf ${OPENFIRE_DIR}/conf_org \
&& mv ${OPENFIRE_DIR}/plugins ${OPENFIRE_DIR}/plugins_org \
&& mv ${OPENFIRE_DIR}/resources/security ${OPENFIRE_DIR}/resources/security_org \
&& rm -rf /var/lib/apt/lists/*
LABEL maintainer="florian.kinder@fankserver.com"
EXPOSE 3478/tcp 3479/tcp 5222/tcp 5223/tcp 5229/tcp 5275/tcp 5276/tcp 5262/tcp 5263/tcp 7070/tcp 7443/tcp 7777/tcp 9090/tcp 9091/tcp
VOLUME ["${OPENFIRE_DATA_DIR}"]
CMD ["/sbin/entrypoint.sh"]