2016-05-25 04:57:07 +00:00
|
|
|
FROM java:openjdk-8-jre
|
|
|
|
MAINTAINER Atlassian Confluence
|
|
|
|
|
|
|
|
# Setup useful environment variables
|
2016-06-01 07:45:21 +00:00
|
|
|
ENV CONFLUENCE_HOME /var/atlassian/application-data/confluence
|
2016-05-26 04:31:55 +00:00
|
|
|
ENV CONFLUENCE_INSTALL /opt/atlassian/confluence
|
2017-05-02 06:20:21 +00:00
|
|
|
ENV CONF_VERSION 6.1.3
|
2016-05-25 04:57:07 +00:00
|
|
|
|
|
|
|
LABEL Description="This image is used to start Atlassian Confluence" Vendor="Atlassian" Version="${CONF_VERSION}"
|
|
|
|
|
|
|
|
ENV CONFLUENCE_DOWNLOAD_URL http://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-${CONF_VERSION}.tar.gz
|
|
|
|
|
|
|
|
ENV MYSQL_VERSION 5.1.38
|
|
|
|
ENV MYSQL_DRIVER_DOWNLOAD_URL http://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-${MYSQL_VERSION}.tar.gz
|
|
|
|
|
|
|
|
# Use the default unprivileged account. This could be considered bad practice
|
|
|
|
# on systems where multiple processes end up being executed by 'daemon' but
|
|
|
|
# here we only ever run one process anyway.
|
|
|
|
ENV RUN_USER daemon
|
|
|
|
ENV RUN_GROUP daemon
|
|
|
|
|
|
|
|
|
|
|
|
# Install Atlassian Confluence and helper tools and setup initial home
|
|
|
|
# directory structure.
|
|
|
|
RUN set -x \
|
|
|
|
&& apt-get update --quiet \
|
|
|
|
&& apt-get install --quiet --yes --no-install-recommends libtcnative-1 xmlstarlet \
|
|
|
|
&& apt-get clean \
|
2016-05-26 04:31:55 +00:00
|
|
|
&& mkdir -p "${CONFLUENCE_HOME}" \
|
|
|
|
&& chmod -R 700 "${CONFLUENCE_HOME}" \
|
|
|
|
&& chown ${RUN_USER}:${RUN_GROUP} "${CONFLUENCE_HOME}" \
|
|
|
|
&& mkdir -p "${CONFLUENCE_INSTALL}/conf" \
|
|
|
|
&& curl -Ls "${CONFLUENCE_DOWNLOAD_URL}" | tar -xz --directory "${CONFLUENCE_INSTALL}" --strip-components=1 --no-same-owner \
|
|
|
|
&& curl -Ls "${MYSQL_DRIVER_DOWNLOAD_URL}" | tar -xz --directory "${CONFLUENCE_INSTALL}/confluence/WEB-INF/lib" --strip-components=1 --no-same-owner "mysql-connector-java-${MYSQL_VERSION}/mysql-connector-java-${MYSQL_VERSION}-bin.jar" \
|
|
|
|
&& chmod -R 700 "${CONFLUENCE_INSTALL}/conf" \
|
|
|
|
&& chmod -R 700 "${CONFLUENCE_INSTALL}/temp" \
|
|
|
|
&& chmod -R 700 "${CONFLUENCE_INSTALL}/logs" \
|
|
|
|
&& chmod -R 700 "${CONFLUENCE_INSTALL}/work" \
|
|
|
|
&& chown -R ${RUN_USER}:${RUN_GROUP} "${CONFLUENCE_INSTALL}/conf" \
|
|
|
|
&& chown -R ${RUN_USER}:${RUN_GROUP} "${CONFLUENCE_INSTALL}/temp" \
|
|
|
|
&& chown -R ${RUN_USER}:${RUN_GROUP} "${CONFLUENCE_INSTALL}/logs" \
|
|
|
|
&& chown -R ${RUN_USER}:${RUN_GROUP} "${CONFLUENCE_INSTALL}/work" \
|
|
|
|
&& echo -e "\nconfluence.home=${CONFLUENCE_HOME}" >> "${CONFLUENCE_INSTALL}/confluence/WEB-INF/classes/confluence-init.properties" \
|
2016-05-25 04:57:07 +00:00
|
|
|
&& xmlstarlet ed --inplace \
|
|
|
|
--delete "Server/@debug" \
|
|
|
|
--delete "Server/Service/Connector/@debug" \
|
|
|
|
--delete "Server/Service/Connector/@useURIValidationHack" \
|
|
|
|
--delete "Server/Service/Connector/@minProcessors" \
|
|
|
|
--delete "Server/Service/Connector/@maxProcessors" \
|
|
|
|
--delete "Server/Service/Engine/@debug" \
|
|
|
|
--delete "Server/Service/Engine/Host/@debug" \
|
|
|
|
--delete "Server/Service/Engine/Host/Context/@debug" \
|
2016-05-26 04:31:55 +00:00
|
|
|
"${CONFLUENCE_INSTALL}/conf/server.xml" \
|
|
|
|
&& touch -d "@0" "${CONFLUENCE_INSTALL}/conf/server.xml"
|
2016-05-25 04:57:07 +00:00
|
|
|
|
|
|
|
# Use the default unprivileged account. This could be considered bad practice
|
|
|
|
# on systems where multiple processes end up being executed by 'daemon' but
|
|
|
|
# here we only ever run one process anyway.
|
|
|
|
USER ${RUN_USER}:${RUN_GROUP}
|
|
|
|
|
|
|
|
# Expose default HTTP connector port.
|
|
|
|
EXPOSE 8090
|
2016-10-27 03:03:46 +00:00
|
|
|
EXPOSE 8091
|
2016-05-25 04:57:07 +00:00
|
|
|
|
|
|
|
# Set volume mount points for installation and home directory. Changes to the
|
|
|
|
# home directory needs to be persisted as well as parts of the installation
|
|
|
|
# directory due to eg. logs.
|
2016-05-26 04:31:55 +00:00
|
|
|
VOLUME ["${CONFLUENCE_INSTALL}", "${CONFLUENCE_HOME}"]
|
2016-05-25 04:57:07 +00:00
|
|
|
|
2016-05-26 04:31:55 +00:00
|
|
|
# Set the default working directory as the Confluence installation directory.
|
|
|
|
WORKDIR ${CONFLUENCE_INSTALL}
|
2016-05-25 04:57:07 +00:00
|
|
|
|
|
|
|
# Run Atlassian Confluence as a foreground process by default.
|
|
|
|
CMD ["./bin/catalina.sh", "run"]
|