-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
52 lines (38 loc) · 1.89 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
##############################################################################
# Dockerfile to build Atlassian Confluence container images
# Based on anapsix/alpine-java:8_server-jre
##############################################################################
FROM anapsix/alpine-java:8_server-jre
MAINTAINER //SEIBERT/MEDIA GmbH <info@seibert-media.net>
ARG VERSION
ENV CONFLUENCE_INST /opt/confluence
ENV CONFLUENCE_HOME /var/opt/confluence
ENV SYSTEM_USER confluence
ENV SYSTEM_GROUP confluence
ENV SYSTEM_HOME /home/confluence
RUN set -x \
&& apk add su-exec tar xmlstarlet wget ca-certificates --update-cache --allow-untrusted --repository http://dl-cdn.alpinelinux.org/alpine/edge/main --repository http://dl-cdn.alpinelinux.org/alpine/edge/community \
&& rm -rf /var/cache/apk/*
RUN set -x \
&& mkdir -p ${CONFLUENCE_INST} \
&& mkdir -p ${CONFLUENCE_HOME}
RUN set -x \
&& mkdir -p ${SYSTEM_HOME} \
&& addgroup -S ${SYSTEM_GROUP} \
&& adduser -S -D -G ${SYSTEM_GROUP} -h ${SYSTEM_HOME} -s /bin/sh ${SYSTEM_USER} \
&& chown -R ${SYSTEM_USER}:${SYSTEM_GROUP} ${SYSTEM_HOME}
RUN set -x \
&& wget -nv -O /tmp/atlassian-confluence-${VERSION}.tar.gz https://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-${VERSION}.tar.gz \
&& tar xfz /tmp/atlassian-confluence-${VERSION}.tar.gz --strip-components=1 -C ${CONFLUENCE_INST} \
&& rm /tmp/atlassian-confluence-${VERSION}.tar.gz \
&& chown -R ${SYSTEM_USER}:${SYSTEM_GROUP} ${CONFLUENCE_INST}
RUN set -x \
&& touch -d "@0" "${CONFLUENCE_INST}/conf/server.xml" \
&& touch -d "@0" "${CONFLUENCE_INST}/bin/setenv.sh" \
&& touch -d "@0" "${CONFLUENCE_INST}/confluence/WEB-INF/classes/confluence-init.properties"
ADD files/service /usr/local/bin/service
ADD files/entrypoint /usr/local/bin/entrypoint
EXPOSE 8009 8090 8091
VOLUME ${CONFLUENCE_HOME}
ENTRYPOINT ["/usr/local/bin/entrypoint"]
CMD ["/usr/local/bin/service"]