2019-08-02 04:52:43 +00:00
|
|
|
FROM adoptopenjdk/openjdk8:alpine
|
|
|
|
|
2019-11-20 09:54:04 +00:00
|
|
|
ENV RUN_USER confluence
|
|
|
|
ENV RUN_GROUP confluence
|
|
|
|
ENV RUN_UID 2002
|
|
|
|
ENV RUN_GID 2002
|
2019-08-02 04:52:43 +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
|
2019-08-02 04:52:43 +00:00
|
|
|
|
2019-08-06 04:19:28 +00:00
|
|
|
WORKDIR $CONFLUENCE_HOME
|
2019-08-02 04:52:43 +00:00
|
|
|
|
|
|
|
# Expose HTTP and Synchrony ports
|
|
|
|
EXPOSE 8090
|
|
|
|
EXPOSE 8091
|
|
|
|
|
2019-11-20 21:22:23 +00:00
|
|
|
CMD ["/entrypoint.py"]
|
2019-08-02 04:52:43 +00:00
|
|
|
ENTRYPOINT ["/sbin/tini", "--"]
|
|
|
|
|
2019-08-12 01:47:59 +00:00
|
|
|
RUN apk add --no-cache ca-certificates wget curl openssh bash procps openssl perl ttf-dejavu tini python3 py3-jinja2
|
2019-08-02 04:52:43 +00:00
|
|
|
|
|
|
|
# Workaround for AdoptOpenJDK Alpine fontconfig bug
|
|
|
|
RUN ln -s /usr/lib/libfontconfig.so.1 /usr/lib/libfontconfig.so \
|
|
|
|
&& ln -s /lib/libuuid.so.1 /usr/lib/libuuid.so.1 \
|
|
|
|
&& ln -s /lib/libc.musl-x86_64.so.1 /usr/lib/libc.musl-x86_64.so.1
|
|
|
|
ENV LD_LIBRARY_PATH /usr/lib
|
|
|
|
|
|
|
|
ARG CONFLUENCE_VERSION
|
2019-08-06 04:19:28 +00:00
|
|
|
ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/confluence/downloads/atlassian-confluence-${CONFLUENCE_VERSION}.tar.gz
|
|
|
|
|
|
|
|
RUN addgroup -g ${RUN_GID} ${RUN_GROUP} \
|
2019-09-05 03:49:07 +00:00
|
|
|
&& adduser -u ${RUN_UID} -G ${RUN_GROUP} -h ${CONFLUENCE_HOME} -s /bin/bash -D ${RUN_USER} \
|
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
|
|
|
\
|
|
|
|
&& 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-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 \
|
|
|
|
shared-components/image/entrypoint_helpers.py /
|
|
|
|
COPY shared-components/support /opt/atlassian/support
|
|
|
|
COPY config/* /opt/atlassian/etc/
|