2021-09-16 04:11:45 +00:00
|
|
|
ARG BASE_IMAGE=adoptopenjdk/openjdk11
|
2019-10-16 23:55:54 +00:00
|
|
|
FROM $BASE_IMAGE
|
2016-05-25 04:57:07 +00:00
|
|
|
|
2021-04-14 01:47:17 +00:00
|
|
|
LABEL maintainer="dc-deployments@atlassian.com"
|
|
|
|
LABEL securitytxt="https://www.atlassian.com/.well-known/security.txt"
|
|
|
|
|
2021-08-26 05:08:52 +00:00
|
|
|
ENV APP_NAME confluence
|
2019-11-20 09:54:04 +00:00
|
|
|
ENV RUN_USER confluence
|
|
|
|
ENV RUN_GROUP confluence
|
|
|
|
ENV RUN_UID 2002
|
|
|
|
ENV RUN_GID 2002
|
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-11-20 09:54:04 +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
|
|
|
|
2020-11-23 22:45:18 +00:00
|
|
|
ENV CONFLUENCE_LOG_STDOUT false
|
2020-11-11 22:30:32 +00:00
|
|
|
|
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
|
|
|
|
2019-11-20 21:22:23 +00:00
|
|
|
CMD ["/entrypoint.py"]
|
2020-10-17 07:57:22 +00:00
|
|
|
ENTRYPOINT ["/usr/bin/tini", "--"]
|
2017-08-25 22:52:43 +00:00
|
|
|
|
2021-04-14 01:47:43 +00:00
|
|
|
RUN apt-get update \
|
2021-04-15 06:37:47 +00:00
|
|
|
&& apt-get upgrade -y \
|
2020-10-17 07:57:22 +00:00
|
|
|
&& apt-get install -y --no-install-recommends fontconfig fonts-noto python3 python3-jinja2 tini \
|
2019-11-20 09:54:04 +00:00
|
|
|
&& apt-get clean autoclean && apt-get autoremove -y && rm -rf /var/lib/apt/lists/*
|
2017-08-25 22:52:43 +00:00
|
|
|
|
2019-05-21 02:00:40 +00:00
|
|
|
ARG CONFLUENCE_VERSION
|
2019-01-31 23:58:52 +00:00
|
|
|
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
|
|
|
|
2022-01-13 00:27:16 +00:00
|
|
|
ENV CONFLUENCE_VERSION ${CONFLUENCE_VERSION}
|
|
|
|
|
2019-08-06 04:19:28 +00:00
|
|
|
RUN groupadd --gid ${RUN_GID} ${RUN_GROUP} \
|
2019-09-05 03:49:07 +00:00
|
|
|
&& useradd --uid ${RUN_UID} --gid ${RUN_GID} --home-dir ${CONFLUENCE_HOME} --shell /bin/bash ${RUN_USER} \
|
|
|
|
&& echo PATH=$PATH > /etc/environment \
|
2019-08-06 04:19:28 +00:00
|
|
|
\
|
2019-11-20 09:54:04 +00:00
|
|
|
&& mkdir -p ${CONFLUENCE_INSTALL_DIR} \
|
|
|
|
&& curl -L --silent ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${CONFLUENCE_INSTALL_DIR}" \
|
|
|
|
&& chmod -R "u=rwX,g=rX,o=rX" ${CONFLUENCE_INSTALL_DIR}/ \
|
|
|
|
&& chown -R root. ${CONFLUENCE_INSTALL_DIR}/ \
|
|
|
|
&& chown -R ${RUN_USER}:${RUN_GROUP} ${CONFLUENCE_INSTALL_DIR}/logs \
|
|
|
|
&& chown -R ${RUN_USER}:${RUN_GROUP} ${CONFLUENCE_INSTALL_DIR}/temp \
|
|
|
|
&& chown -R ${RUN_USER}:${RUN_GROUP} ${CONFLUENCE_INSTALL_DIR}/work \
|
|
|
|
&& chown -R ${RUN_USER}:${RUN_GROUP} ${CONFLUENCE_HOME} \
|
2019-08-06 04:19:28 +00:00
|
|
|
\
|
2020-05-29 06:46:57 +00:00
|
|
|
&& sed -i -e 's/-Xms\([0-9]\+[kmg]\) -Xmx\([0-9]\+[kmg]\)/-Xms\${JVM_MINIMUM_MEMORY:=\1} -Xmx\${JVM_MAXIMUM_MEMORY:=\2} -Dconfluence.home=\${CONFLUENCE_HOME}/g' ${CONFLUENCE_INSTALL_DIR}/bin/setenv.sh \
|
|
|
|
&& sed -i -e 's/-XX:ReservedCodeCacheSize=\([0-9]\+[kmg]\)/-XX:ReservedCodeCacheSize=${JVM_RESERVED_CODE_CACHE_SIZE:=\1}/g' ${CONFLUENCE_INSTALL_DIR}/bin/setenv.sh \
|
2020-11-11 22:30:32 +00:00
|
|
|
&& sed -i -e 's/export CATALINA_OPTS/CATALINA_OPTS="\${CATALINA_OPTS} \${JVM_SUPPORT_RECOMMENDED_ARGS} -DConfluenceHomeLogAppender.disabled=${CONFLUENCE_LOG_STDOUT}"\n\nexport CATALINA_OPTS/g' ${CONFLUENCE_INSTALL_DIR}/bin/setenv.sh \
|
2020-08-24 03:24:52 +00:00
|
|
|
\
|
|
|
|
&& mkdir -p /opt/java/openjdk/lib/fonts/fallback/ \
|
|
|
|
&& ln -sf /usr/share/fonts/truetype/noto/* /opt/java/openjdk/lib/fonts/fallback/
|
2019-08-13 01:22:30 +00:00
|
|
|
|
2019-09-05 03:49:07 +00:00
|
|
|
VOLUME ["${CONFLUENCE_HOME}"] # Must be declared after setting perms
|
|
|
|
|
2019-11-20 09:54:04 +00:00
|
|
|
COPY entrypoint.py \
|
2021-08-26 05:08:52 +00:00
|
|
|
shutdown-wait.sh \
|
2019-11-20 09:54:04 +00:00
|
|
|
shared-components/image/entrypoint_helpers.py /
|
|
|
|
COPY shared-components/support /opt/atlassian/support
|
|
|
|
COPY config/* /opt/atlassian/etc/
|