2019-01-31 23:58:52 +00:00
|
|
|
FROM adoptopenjdk/openjdk8:slim
|
2016-05-25 04:57:07 +00:00
|
|
|
|
2019-01-31 23:58:52 +00:00
|
|
|
ENV RUN_USER daemon
|
|
|
|
ENV RUN_GROUP daemon
|
2016-05-25 04:57:07 +00:00
|
|
|
|
2017-08-25 23:19:50 +00:00
|
|
|
# https://confluence.atlassian.com/doc/confluence-home-and-other-important-directories-590259707.html
|
2019-01-31 23:58:52 +00:00
|
|
|
ENV CONFLUENCE_HOME /var/atlassian/application-data/confluence
|
|
|
|
ENV CONFLUENCE_INSTALL_DIR /opt/atlassian/confluence
|
2016-05-25 04:57:07 +00:00
|
|
|
|
2017-08-25 22:52:43 +00:00
|
|
|
VOLUME ["${CONFLUENCE_HOME}"]
|
2019-01-31 23:58:52 +00:00
|
|
|
WORKDIR $CONFLUENCE_HOME
|
2016-05-25 04:57:07 +00:00
|
|
|
|
2017-08-25 22:52:43 +00:00
|
|
|
# Expose HTTP and Synchrony ports
|
2016-05-25 04:57:07 +00:00
|
|
|
EXPOSE 8090
|
2016-10-27 03:03:46 +00:00
|
|
|
EXPOSE 8091
|
2016-05-25 04:57:07 +00:00
|
|
|
|
2017-08-25 22:52:43 +00:00
|
|
|
CMD ["/entrypoint.sh", "-fg"]
|
2019-01-31 23:58:52 +00:00
|
|
|
ENTRYPOINT ["/tini", "--"]
|
2017-08-25 22:52:43 +00:00
|
|
|
|
2019-01-31 23:58:52 +00:00
|
|
|
RUN apt-get update \
|
|
|
|
&& apt-get install -y --no-install-recommends fontconfig \
|
|
|
|
&& apt-get clean autoclean && apt-get autoremove -y && rm -rf /var/lib/apt/lists/*
|
2017-08-25 22:52:43 +00:00
|
|
|
|
2019-01-31 23:58:52 +00:00
|
|
|
ARG TINI_VERSION=v0.18.0
|
|
|
|
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
|
|
|
|
RUN chmod +x /tini
|
2017-08-25 22:52:43 +00:00
|
|
|
|
2019-01-31 23:58:52 +00:00
|
|
|
COPY entrypoint.sh /entrypoint.sh
|
2016-05-25 04:57:07 +00:00
|
|
|
|
2019-01-31 23:58:52 +00:00
|
|
|
ARG CONFLUENCE_VERSION=6.3.3
|
|
|
|
ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/confluence/downloads/atlassian-confluence-${CONFLUENCE_VERSION}.tar.gz
|
2016-05-25 04:57:07 +00:00
|
|
|
|
2019-01-31 23:58:52 +00:00
|
|
|
RUN mkdir -p ${CONFLUENCE_INSTALL_DIR} \
|
|
|
|
&& curl -L --silent ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${CONFLUENCE_INSTALL_DIR}" \
|
|
|
|
&& chown -R ${RUN_USER}:${RUN_GROUP} ${CONFLUENCE_INSTALL_DIR}/ \
|
2017-08-25 23:19:50 +00:00
|
|
|
&& sed -i -e 's/-Xms\([0-9]\+[kmg]\) -Xmx\([0-9]\+[kmg]\)/-Xms\${JVM_MINIMUM_MEMORY:=\1} -Xmx\${JVM_MAXIMUM_MEMORY:=\2} \${JVM_SUPPORT_RECOMMENDED_ARGS} -Dconfluence.home=\${CONFLUENCE_HOME}/g' ${CONFLUENCE_INSTALL_DIR}/bin/setenv.sh \
|
2019-01-31 23:58:52 +00:00
|
|
|
&& sed -i -e 's/port="8090"/port="8090" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${CONFLUENCE_INSTALL_DIR}/conf/server.xml \
|
2018-10-11 23:43:29 +00:00
|
|
|
&& sed -i -e 's/Context path=""/Context path="${catalinaContextPath}"/' ${CONFLUENCE_INSTALL_DIR}/conf/server.xml
|