From 7086b48a65dd426f2f46a1a9efadfbca60387d78 Mon Sep 17 00:00:00 2001 From: stam Date: Thu, 16 Jan 2020 14:05:07 +0300 Subject: [PATCH] Confluence 6.1 --- .travis.yml | 22 +++ CHANGELOG.md | 1 + .../confluence/6.1.0/.docker-repository.yml | 1 + atlassian/confluence/6.1.0/.dockerignore | 3 + atlassian/confluence/6.1.0/Dockerfile | 46 ++++++ atlassian/confluence/6.1.0/Makefile | 5 + atlassian/confluence/6.1.0/README.md | 131 ++++++++++++++++++ atlassian/confluence/6.1.0/entrypoint.sh | 39 ++++++ .../confluence/6.1.1/.docker-repository.yml | 1 + atlassian/confluence/6.1.1/.dockerignore | 3 + atlassian/confluence/6.1.1/Dockerfile | 46 ++++++ atlassian/confluence/6.1.1/Makefile | 5 + atlassian/confluence/6.1.1/README.md | 131 ++++++++++++++++++ atlassian/confluence/6.1.1/entrypoint.sh | 39 ++++++ .../confluence/6.1.2/.docker-repository.yml | 1 + atlassian/confluence/6.1.2/.dockerignore | 3 + atlassian/confluence/6.1.2/Dockerfile | 46 ++++++ atlassian/confluence/6.1.2/Makefile | 5 + atlassian/confluence/6.1.2/README.md | 131 ++++++++++++++++++ atlassian/confluence/6.1.2/entrypoint.sh | 39 ++++++ .../confluence/6.1.3/.docker-repository.yml | 1 + atlassian/confluence/6.1.3/.dockerignore | 3 + atlassian/confluence/6.1.3/Dockerfile | 46 ++++++ atlassian/confluence/6.1.3/Makefile | 5 + atlassian/confluence/6.1.3/README.md | 131 ++++++++++++++++++ atlassian/confluence/6.1.3/entrypoint.sh | 39 ++++++ .../confluence/6.1.4/.docker-repository.yml | 1 + atlassian/confluence/6.1.4/.dockerignore | 3 + atlassian/confluence/6.1.4/Dockerfile | 46 ++++++ atlassian/confluence/6.1.4/Makefile | 5 + atlassian/confluence/6.1.4/README.md | 131 ++++++++++++++++++ atlassian/confluence/6.1.4/entrypoint.sh | 39 ++++++ 32 files changed, 1148 insertions(+) create mode 100644 atlassian/confluence/6.1.0/.docker-repository.yml create mode 100644 atlassian/confluence/6.1.0/.dockerignore create mode 100644 atlassian/confluence/6.1.0/Dockerfile create mode 100644 atlassian/confluence/6.1.0/Makefile create mode 100644 atlassian/confluence/6.1.0/README.md create mode 100644 atlassian/confluence/6.1.0/entrypoint.sh create mode 100644 atlassian/confluence/6.1.1/.docker-repository.yml create mode 100644 atlassian/confluence/6.1.1/.dockerignore create mode 100644 atlassian/confluence/6.1.1/Dockerfile create mode 100644 atlassian/confluence/6.1.1/Makefile create mode 100644 atlassian/confluence/6.1.1/README.md create mode 100644 atlassian/confluence/6.1.1/entrypoint.sh create mode 100644 atlassian/confluence/6.1.2/.docker-repository.yml create mode 100644 atlassian/confluence/6.1.2/.dockerignore create mode 100644 atlassian/confluence/6.1.2/Dockerfile create mode 100644 atlassian/confluence/6.1.2/Makefile create mode 100644 atlassian/confluence/6.1.2/README.md create mode 100644 atlassian/confluence/6.1.2/entrypoint.sh create mode 100644 atlassian/confluence/6.1.3/.docker-repository.yml create mode 100644 atlassian/confluence/6.1.3/.dockerignore create mode 100644 atlassian/confluence/6.1.3/Dockerfile create mode 100644 atlassian/confluence/6.1.3/Makefile create mode 100644 atlassian/confluence/6.1.3/README.md create mode 100644 atlassian/confluence/6.1.3/entrypoint.sh create mode 100644 atlassian/confluence/6.1.4/.docker-repository.yml create mode 100644 atlassian/confluence/6.1.4/.dockerignore create mode 100644 atlassian/confluence/6.1.4/Dockerfile create mode 100644 atlassian/confluence/6.1.4/Makefile create mode 100644 atlassian/confluence/6.1.4/README.md create mode 100644 atlassian/confluence/6.1.4/entrypoint.sh diff --git a/.travis.yml b/.travis.yml index fc6542c4c..d42e6a2d3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -554,6 +554,28 @@ matrix: - docker build --compress -t epicmorg/confluence:6.0.7 atlassian/confluence/6.0.7 - docker push epicmorg/confluence:6.0.7 + +########## + + - name: Confluence 6.1.x + script: + - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin + + - docker build --compress -t epicmorg/confluence:6.1.0 atlassian/confluence/6.1.0 + - docker push epicmorg/confluence:6.1.0 + + - docker build --compress -t epicmorg/confluence:6.1.1 atlassian/confluence/6.1.1 + - docker push epicmorg/confluence:6.1.1 + + - docker build --compress -t epicmorg/confluence:6.1.2 atlassian/confluence/6.1.2 + - docker push epicmorg/confluence:6.1.2 + + - docker build --compress -t epicmorg/confluence:6.1.3 atlassian/confluence/6.1.3 + - docker push epicmorg/confluence:6.1.3 + + - docker build --compress -t epicmorg/confluence:6.1.4 atlassian/confluence/6.1.4 + - docker push epicmorg/confluence:6.1.4 + ########## - name: Confluence 6.9.0 diff --git a/CHANGELOG.md b/CHANGELOG.md index ae91665fc..fa674f6ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ * added `Bitbucket 6.9.x`: `6.9.0`, `6.9.1` * added `Bitbucket 6.10.x`: `6.10.0` * added `Confluence 6.0.x`: `6.0.1`, `6.0.2`, `6.0.3`, `6.0.4`, `6.0.5`, `6.0.6`, `6.0.7` + * added `Confluence 6.1.x`: `6.1.0`, `6.1.1`, `6.1.2`, `6.1.3`, `6.1.4` * 12/13/2019 * updated `teamcity agent`. added `php 7.3` support. * fixed `nginx` image. diff --git a/atlassian/confluence/6.1.0/.docker-repository.yml b/atlassian/confluence/6.1.0/.docker-repository.yml new file mode 100644 index 000000000..efb9f8b2d --- /dev/null +++ b/atlassian/confluence/6.1.0/.docker-repository.yml @@ -0,0 +1 @@ +repository: epicmorg/confluence diff --git a/atlassian/confluence/6.1.0/.dockerignore b/atlassian/confluence/6.1.0/.dockerignore new file mode 100644 index 000000000..99176b278 --- /dev/null +++ b/atlassian/confluence/6.1.0/.dockerignore @@ -0,0 +1,3 @@ +.git +scripts +.idea \ No newline at end of file diff --git a/atlassian/confluence/6.1.0/Dockerfile b/atlassian/confluence/6.1.0/Dockerfile new file mode 100644 index 000000000..9e5c98eb9 --- /dev/null +++ b/atlassian/confluence/6.1.0/Dockerfile @@ -0,0 +1,46 @@ +FROM epicmorg/prod:jdk8 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ARG CONFLUENCE_VERSION=6.1.0 +ARG DOWNLOAD_URL=http://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-${CONFLUENCE_VERSION}.tar.gz + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/doc/confluence-home-and-other-important-directories-590259707.html +ENV CONFLUENCE_HOME /var/atlassian/application-data/confluence +ENV CONFLUENCE_INSTALL_DIR /opt/atlassian/confluence + +VOLUME ["${CONFLUENCE_HOME}"] +WORKDIR $CONFLUENCE_HOME + +# Expose HTTP and Synchrony ports +EXPOSE 8090 +EXPOSE 8091 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${CONFLUENCE_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$CONFLUENCE_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${CONFLUENCE_INSTALL_DIR}/ \ + && 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 \ + && sed -i -e 's/port="8090"/port="8090" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${CONFLUENCE_INSTALL_DIR}/conf/server.xml && \ + + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/atlassian/confluence/6.1.0/Makefile b/atlassian/confluence/6.1.0/Makefile new file mode 100644 index 000000000..a85eda5df --- /dev/null +++ b/atlassian/confluence/6.1.0/Makefile @@ -0,0 +1,5 @@ +all: confl + +confl: + docker build --compress -t epicmorg/confluence:6.1.0 . + diff --git a/atlassian/confluence/6.1.0/README.md b/atlassian/confluence/6.1.0/README.md new file mode 100644 index 000000000..7e5b92f37 --- /dev/null +++ b/atlassian/confluence/6.1.0/README.md @@ -0,0 +1,131 @@ +![Atlassian Confluence Server](https://www.atlassian.com/dam/wac/legacy/confluence_logo_landing.png) + +Confluence Server is where you create, organise and discuss work with your team. Capture the knowledge that's too often lost in email inboxes and shared network drives in Confluence – where it's easy to find, use, and update. Give every team, project, or department its own space to create the things they need, whether it's meeting notes, product requirements, file lists, or project plans, you can get more done in Confluence. + +Learn more about Confluence Server: + +You can find the repository for this Dockerfile at + +# Overview + +This Docker container makes it easy to get an instance of Confluence up and running. + +# Quick Start + +For the directory in the environmental variable `CONFLUENCE_HOME` that is used to store Confluence data +(amongst other things) we recommend mounting a host directory as a [data volume](https://docs.docker.com/userguide/dockervolumes/#mount-a-host-directory-as-a-data-volume): + +Start Atlassian Confluence Server: + + $> docker run -v /data/your-confluence-home:/var/atlassian/application-data/confluence --name="confluence" -d -p 8090:8090 -p 8091:8091 epicmorg/confluence + + +**Success**. Confluence is now available on [http://localhost:8090](http://localhost:8090)* + +Please ensure your container has the necessary resources allocated to it. +We recommend 2GiB of memory allocated to accommodate the application server. +See [Supported Platforms](https://confluence.atlassian.com/display/DOC/Supported+platforms) for further information. + + +_* Note: If you are using `docker-machine` on Mac OS X, please use `open http://$(docker-machine ip default):8090` instead._ + +## Memory / Heap Size + +If you need to override Confluence Server's default memory allocation, you can control the minimum heap (Xms) and maximum heap (Xmx) via the below environment variables. + +* `JVM_MINIMUM_MEMORY` (default: 1024m) + + The minimum heap size of the JVM + +* `JVM_MAXIMUM_MEMORY` (default: 1024m) + + The maximum heap size of the JVM + +## Reverse Proxy Settings + +If Confluence is run behind a reverse proxy server, then you need to specify extra options to make Confluence aware of the setup. They can be controlled via the below environment variables. + +* `CATALINA_CONNECTOR_PROXYNAME` (default: NONE) + + The reverse proxy's fully qualified hostname. + +* `CATALINA_CONNECTOR_PROXYPORT` (default: NONE) + + The reverse proxy's port number via which Confluence is accessed. + +* `CATALINA_CONNECTOR_SCHEME` (default: http) + + The protocol via which Confluence is accessed. + +* `CATALINA_CONNECTOR_SECURE` (default: false) + + Set 'true' if CATALINA_CONNECTOR_SCHEME is 'https'. + +## JVM configuration + +If you need to pass additional JVM arguments to Confluence such as specifying a custom trust store, you can add them via the below environment variable + +* `JVM_SUPPORT_RECOMMENDED_ARGS` + + Additional JVM arguments for Confluence + +Example: + + $> docker run -e JVM_SUPPORT_RECOMMENDED_ARGS=-Djavax.net.ssl.trustStore=/var/atlassian/application-data/confluence/cacerts -v confluenceVolume:/var/atlassian/application-data/confluence --name="confluence" -d -p 8090:8090 -p 8091:8091 epicmorg/confluence + + +# Upgrade + +To upgrade to a more recent version of Confluence Server you can simply stop the `Confluence` +container and start a new one based on a more recent image: + + $> docker stop confluence + $> docker rm confluence + $> docker run ... (see above) + +As your data is stored in the data volume directory on the host, it will still +be available after the upgrade. + +_Note: Please make sure that you **don't** accidentally remove the `confluence` +container and its volumes using the `-v` option._ + +# Backup + +For evaluating Confluence you can use the built-in database that will store its files in the Confluence Server home directory. In that case it is sufficient to create a backup archive of the directory on the host that is used as a volume (`/data/your-confluence-home` in the example above). + +Confluence's [automatic backup](https://confluence.atlassian.com/display/DOC/Configuring+Backups) is currently supported in the Docker setup. You can also use the [Production Backup Strategy](https://confluence.atlassian.com/display/DOC/Production+Backup+Strategy) approach if you're using an external database. + +Read more about data recovery and backups: [Site Backup and Restore](https://confluence.atlassian.com/display/DOC/Site+Backup+and+Restore) + +# Versioning + +The `latest` tag matches the most recent release of Atlassian Confluence Server. +So `epicmorg/confluence:latest` will use the newest stable version of Confluence Server available. + +Alternatively, you can use a specific minor version of Confluence Server by using a version number +tag: `epicmorg/confluence:5.10.8`. This will install the latest `5.10.8` version that +is available. + +## Versions available + +* `epicmorg/confluence:latest` +* `epicmorg/confluence:5.6.4` +* `epicmorg/confluence:5.10.8` + +# Known Problems +In Mac OS X with Docker version 1.11.0, when running with docker-machine, there is a bug where the directory specified for `CONFLUENCE_HOME` in a volume mount will not have the correct permission, and thus startup fails with a permission denied error: + Error writing state to confluence.cfg.xml +com.atlassian.config.ConfigurationException: Couldn't save confluence.cfg.xml to /var/atlassian/confluence-home directory. + +See https://github.com/docker/docker/issues/4023 for details. + +To work around this issue, use a different host operating system other than Mac OSX until a newer release of Docker fixes this issue. + +# Support + +This Docker image is great for evaluating Confluence. However, it does not use an Oracle JDK due to licensing constraints. Instead, it uses OpenJDK which is not supported for running Confluence in production. + +To meet our supported platform requirements, you'll need to build your own image based on [Oracle JDK](https://github.com/oracle/docker-images/tree/master/OracleJDK). See [Update the Confluence Docker image to use Oracle JDK ](https://confluence.atlassian.com/display/CONFKB/Update+the+Confluence+Docker+image+to+use+Oracle+JDK) for more info. + +For product support go to [support.atlassian.com](http://support.atlassian.com). + diff --git a/atlassian/confluence/6.1.0/entrypoint.sh b/atlassian/confluence/6.1.0/entrypoint.sh new file mode 100644 index 000000000..250fc031a --- /dev/null +++ b/atlassian/confluence/6.1.0/entrypoint.sh @@ -0,0 +1,39 @@ +#!/bin/bash +set -euo pipefail + +export JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::") +export JRE_HOME="$JAVA_HOME/jre" +export JAVA_BINARY="$JRE_HOME/bin/java" +export JAVA_VERSION=$("$JAVA_BINARY" -version 2>&1 | awk -F '"' '/version/ {print $2}') + + +# Setup Catalina Opts +: ${CATALINA_CONNECTOR_PROXYNAME:=} +: ${CATALINA_CONNECTOR_PROXYPORT:=} +: ${CATALINA_CONNECTOR_SCHEME:=http} +: ${CATALINA_CONNECTOR_SECURE:=false} + +: ${CATALINA_OPTS:=} + +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyName=${CATALINA_CONNECTOR_PROXYNAME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyPort=${CATALINA_CONNECTOR_PROXYPORT}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorScheme=${CATALINA_CONNECTOR_SCHEME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorSecure=${CATALINA_CONNECTOR_SECURE}" + +export CATALINA_OPTS + + +# Start Confluence as the correct user +if [ "${UID}" -eq 0 ]; then + echo "User is currently root. Will change directory ownership to ${RUN_USER}:${RUN_GROUP}, then downgrade permission to ${RUN_USER}" + PERMISSIONS_SIGNATURE=$(stat -c "%u:%U:%a" "${CONFLUENCE_HOME}") + EXPECTED_PERMISSIONS=$(id -u ${RUN_USER}):${RUN_USER}:700 + if [ "${PERMISSIONS_SIGNATURE}" != "${EXPECTED_PERMISSIONS}" ]; then + chmod -R 700 "${CONFLUENCE_HOME}" && + chown -R "${RUN_USER}:${RUN_GROUP}" "${CONFLUENCE_HOME}" + fi + # Now drop privileges + exec su -s /bin/bash "${RUN_USER}" -c "$CONFLUENCE_INSTALL_DIR/bin/start-confluence.sh $@" +else + exec "$CONFLUENCE_INSTALL_DIR/bin/start-confluence.sh" "$@" +fi diff --git a/atlassian/confluence/6.1.1/.docker-repository.yml b/atlassian/confluence/6.1.1/.docker-repository.yml new file mode 100644 index 000000000..efb9f8b2d --- /dev/null +++ b/atlassian/confluence/6.1.1/.docker-repository.yml @@ -0,0 +1 @@ +repository: epicmorg/confluence diff --git a/atlassian/confluence/6.1.1/.dockerignore b/atlassian/confluence/6.1.1/.dockerignore new file mode 100644 index 000000000..99176b278 --- /dev/null +++ b/atlassian/confluence/6.1.1/.dockerignore @@ -0,0 +1,3 @@ +.git +scripts +.idea \ No newline at end of file diff --git a/atlassian/confluence/6.1.1/Dockerfile b/atlassian/confluence/6.1.1/Dockerfile new file mode 100644 index 000000000..66b185a7e --- /dev/null +++ b/atlassian/confluence/6.1.1/Dockerfile @@ -0,0 +1,46 @@ +FROM epicmorg/prod:jdk8 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ARG CONFLUENCE_VERSION=6.1.1 +ARG DOWNLOAD_URL=http://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-${CONFLUENCE_VERSION}.tar.gz + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/doc/confluence-home-and-other-important-directories-590259707.html +ENV CONFLUENCE_HOME /var/atlassian/application-data/confluence +ENV CONFLUENCE_INSTALL_DIR /opt/atlassian/confluence + +VOLUME ["${CONFLUENCE_HOME}"] +WORKDIR $CONFLUENCE_HOME + +# Expose HTTP and Synchrony ports +EXPOSE 8090 +EXPOSE 8091 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${CONFLUENCE_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$CONFLUENCE_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${CONFLUENCE_INSTALL_DIR}/ \ + && 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 \ + && sed -i -e 's/port="8090"/port="8090" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${CONFLUENCE_INSTALL_DIR}/conf/server.xml && \ + + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/atlassian/confluence/6.1.1/Makefile b/atlassian/confluence/6.1.1/Makefile new file mode 100644 index 000000000..79cbcdbfb --- /dev/null +++ b/atlassian/confluence/6.1.1/Makefile @@ -0,0 +1,5 @@ +all: confl + +confl: + docker build --compress -t epicmorg/confluence:6.1.1 . + diff --git a/atlassian/confluence/6.1.1/README.md b/atlassian/confluence/6.1.1/README.md new file mode 100644 index 000000000..7e5b92f37 --- /dev/null +++ b/atlassian/confluence/6.1.1/README.md @@ -0,0 +1,131 @@ +![Atlassian Confluence Server](https://www.atlassian.com/dam/wac/legacy/confluence_logo_landing.png) + +Confluence Server is where you create, organise and discuss work with your team. Capture the knowledge that's too often lost in email inboxes and shared network drives in Confluence – where it's easy to find, use, and update. Give every team, project, or department its own space to create the things they need, whether it's meeting notes, product requirements, file lists, or project plans, you can get more done in Confluence. + +Learn more about Confluence Server: + +You can find the repository for this Dockerfile at + +# Overview + +This Docker container makes it easy to get an instance of Confluence up and running. + +# Quick Start + +For the directory in the environmental variable `CONFLUENCE_HOME` that is used to store Confluence data +(amongst other things) we recommend mounting a host directory as a [data volume](https://docs.docker.com/userguide/dockervolumes/#mount-a-host-directory-as-a-data-volume): + +Start Atlassian Confluence Server: + + $> docker run -v /data/your-confluence-home:/var/atlassian/application-data/confluence --name="confluence" -d -p 8090:8090 -p 8091:8091 epicmorg/confluence + + +**Success**. Confluence is now available on [http://localhost:8090](http://localhost:8090)* + +Please ensure your container has the necessary resources allocated to it. +We recommend 2GiB of memory allocated to accommodate the application server. +See [Supported Platforms](https://confluence.atlassian.com/display/DOC/Supported+platforms) for further information. + + +_* Note: If you are using `docker-machine` on Mac OS X, please use `open http://$(docker-machine ip default):8090` instead._ + +## Memory / Heap Size + +If you need to override Confluence Server's default memory allocation, you can control the minimum heap (Xms) and maximum heap (Xmx) via the below environment variables. + +* `JVM_MINIMUM_MEMORY` (default: 1024m) + + The minimum heap size of the JVM + +* `JVM_MAXIMUM_MEMORY` (default: 1024m) + + The maximum heap size of the JVM + +## Reverse Proxy Settings + +If Confluence is run behind a reverse proxy server, then you need to specify extra options to make Confluence aware of the setup. They can be controlled via the below environment variables. + +* `CATALINA_CONNECTOR_PROXYNAME` (default: NONE) + + The reverse proxy's fully qualified hostname. + +* `CATALINA_CONNECTOR_PROXYPORT` (default: NONE) + + The reverse proxy's port number via which Confluence is accessed. + +* `CATALINA_CONNECTOR_SCHEME` (default: http) + + The protocol via which Confluence is accessed. + +* `CATALINA_CONNECTOR_SECURE` (default: false) + + Set 'true' if CATALINA_CONNECTOR_SCHEME is 'https'. + +## JVM configuration + +If you need to pass additional JVM arguments to Confluence such as specifying a custom trust store, you can add them via the below environment variable + +* `JVM_SUPPORT_RECOMMENDED_ARGS` + + Additional JVM arguments for Confluence + +Example: + + $> docker run -e JVM_SUPPORT_RECOMMENDED_ARGS=-Djavax.net.ssl.trustStore=/var/atlassian/application-data/confluence/cacerts -v confluenceVolume:/var/atlassian/application-data/confluence --name="confluence" -d -p 8090:8090 -p 8091:8091 epicmorg/confluence + + +# Upgrade + +To upgrade to a more recent version of Confluence Server you can simply stop the `Confluence` +container and start a new one based on a more recent image: + + $> docker stop confluence + $> docker rm confluence + $> docker run ... (see above) + +As your data is stored in the data volume directory on the host, it will still +be available after the upgrade. + +_Note: Please make sure that you **don't** accidentally remove the `confluence` +container and its volumes using the `-v` option._ + +# Backup + +For evaluating Confluence you can use the built-in database that will store its files in the Confluence Server home directory. In that case it is sufficient to create a backup archive of the directory on the host that is used as a volume (`/data/your-confluence-home` in the example above). + +Confluence's [automatic backup](https://confluence.atlassian.com/display/DOC/Configuring+Backups) is currently supported in the Docker setup. You can also use the [Production Backup Strategy](https://confluence.atlassian.com/display/DOC/Production+Backup+Strategy) approach if you're using an external database. + +Read more about data recovery and backups: [Site Backup and Restore](https://confluence.atlassian.com/display/DOC/Site+Backup+and+Restore) + +# Versioning + +The `latest` tag matches the most recent release of Atlassian Confluence Server. +So `epicmorg/confluence:latest` will use the newest stable version of Confluence Server available. + +Alternatively, you can use a specific minor version of Confluence Server by using a version number +tag: `epicmorg/confluence:5.10.8`. This will install the latest `5.10.8` version that +is available. + +## Versions available + +* `epicmorg/confluence:latest` +* `epicmorg/confluence:5.6.4` +* `epicmorg/confluence:5.10.8` + +# Known Problems +In Mac OS X with Docker version 1.11.0, when running with docker-machine, there is a bug where the directory specified for `CONFLUENCE_HOME` in a volume mount will not have the correct permission, and thus startup fails with a permission denied error: + Error writing state to confluence.cfg.xml +com.atlassian.config.ConfigurationException: Couldn't save confluence.cfg.xml to /var/atlassian/confluence-home directory. + +See https://github.com/docker/docker/issues/4023 for details. + +To work around this issue, use a different host operating system other than Mac OSX until a newer release of Docker fixes this issue. + +# Support + +This Docker image is great for evaluating Confluence. However, it does not use an Oracle JDK due to licensing constraints. Instead, it uses OpenJDK which is not supported for running Confluence in production. + +To meet our supported platform requirements, you'll need to build your own image based on [Oracle JDK](https://github.com/oracle/docker-images/tree/master/OracleJDK). See [Update the Confluence Docker image to use Oracle JDK ](https://confluence.atlassian.com/display/CONFKB/Update+the+Confluence+Docker+image+to+use+Oracle+JDK) for more info. + +For product support go to [support.atlassian.com](http://support.atlassian.com). + diff --git a/atlassian/confluence/6.1.1/entrypoint.sh b/atlassian/confluence/6.1.1/entrypoint.sh new file mode 100644 index 000000000..250fc031a --- /dev/null +++ b/atlassian/confluence/6.1.1/entrypoint.sh @@ -0,0 +1,39 @@ +#!/bin/bash +set -euo pipefail + +export JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::") +export JRE_HOME="$JAVA_HOME/jre" +export JAVA_BINARY="$JRE_HOME/bin/java" +export JAVA_VERSION=$("$JAVA_BINARY" -version 2>&1 | awk -F '"' '/version/ {print $2}') + + +# Setup Catalina Opts +: ${CATALINA_CONNECTOR_PROXYNAME:=} +: ${CATALINA_CONNECTOR_PROXYPORT:=} +: ${CATALINA_CONNECTOR_SCHEME:=http} +: ${CATALINA_CONNECTOR_SECURE:=false} + +: ${CATALINA_OPTS:=} + +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyName=${CATALINA_CONNECTOR_PROXYNAME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyPort=${CATALINA_CONNECTOR_PROXYPORT}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorScheme=${CATALINA_CONNECTOR_SCHEME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorSecure=${CATALINA_CONNECTOR_SECURE}" + +export CATALINA_OPTS + + +# Start Confluence as the correct user +if [ "${UID}" -eq 0 ]; then + echo "User is currently root. Will change directory ownership to ${RUN_USER}:${RUN_GROUP}, then downgrade permission to ${RUN_USER}" + PERMISSIONS_SIGNATURE=$(stat -c "%u:%U:%a" "${CONFLUENCE_HOME}") + EXPECTED_PERMISSIONS=$(id -u ${RUN_USER}):${RUN_USER}:700 + if [ "${PERMISSIONS_SIGNATURE}" != "${EXPECTED_PERMISSIONS}" ]; then + chmod -R 700 "${CONFLUENCE_HOME}" && + chown -R "${RUN_USER}:${RUN_GROUP}" "${CONFLUENCE_HOME}" + fi + # Now drop privileges + exec su -s /bin/bash "${RUN_USER}" -c "$CONFLUENCE_INSTALL_DIR/bin/start-confluence.sh $@" +else + exec "$CONFLUENCE_INSTALL_DIR/bin/start-confluence.sh" "$@" +fi diff --git a/atlassian/confluence/6.1.2/.docker-repository.yml b/atlassian/confluence/6.1.2/.docker-repository.yml new file mode 100644 index 000000000..efb9f8b2d --- /dev/null +++ b/atlassian/confluence/6.1.2/.docker-repository.yml @@ -0,0 +1 @@ +repository: epicmorg/confluence diff --git a/atlassian/confluence/6.1.2/.dockerignore b/atlassian/confluence/6.1.2/.dockerignore new file mode 100644 index 000000000..99176b278 --- /dev/null +++ b/atlassian/confluence/6.1.2/.dockerignore @@ -0,0 +1,3 @@ +.git +scripts +.idea \ No newline at end of file diff --git a/atlassian/confluence/6.1.2/Dockerfile b/atlassian/confluence/6.1.2/Dockerfile new file mode 100644 index 000000000..1a8620f8d --- /dev/null +++ b/atlassian/confluence/6.1.2/Dockerfile @@ -0,0 +1,46 @@ +FROM epicmorg/prod:jdk8 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ARG CONFLUENCE_VERSION=6.1.2 +ARG DOWNLOAD_URL=http://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-${CONFLUENCE_VERSION}.tar.gz + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/doc/confluence-home-and-other-important-directories-590259707.html +ENV CONFLUENCE_HOME /var/atlassian/application-data/confluence +ENV CONFLUENCE_INSTALL_DIR /opt/atlassian/confluence + +VOLUME ["${CONFLUENCE_HOME}"] +WORKDIR $CONFLUENCE_HOME + +# Expose HTTP and Synchrony ports +EXPOSE 8090 +EXPOSE 8091 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${CONFLUENCE_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$CONFLUENCE_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${CONFLUENCE_INSTALL_DIR}/ \ + && 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 \ + && sed -i -e 's/port="8090"/port="8090" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${CONFLUENCE_INSTALL_DIR}/conf/server.xml && \ + + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/atlassian/confluence/6.1.2/Makefile b/atlassian/confluence/6.1.2/Makefile new file mode 100644 index 000000000..384fecef4 --- /dev/null +++ b/atlassian/confluence/6.1.2/Makefile @@ -0,0 +1,5 @@ +all: confl + +confl: + docker build --compress -t epicmorg/confluence:6.1.2 . + diff --git a/atlassian/confluence/6.1.2/README.md b/atlassian/confluence/6.1.2/README.md new file mode 100644 index 000000000..7e5b92f37 --- /dev/null +++ b/atlassian/confluence/6.1.2/README.md @@ -0,0 +1,131 @@ +![Atlassian Confluence Server](https://www.atlassian.com/dam/wac/legacy/confluence_logo_landing.png) + +Confluence Server is where you create, organise and discuss work with your team. Capture the knowledge that's too often lost in email inboxes and shared network drives in Confluence – where it's easy to find, use, and update. Give every team, project, or department its own space to create the things they need, whether it's meeting notes, product requirements, file lists, or project plans, you can get more done in Confluence. + +Learn more about Confluence Server: + +You can find the repository for this Dockerfile at + +# Overview + +This Docker container makes it easy to get an instance of Confluence up and running. + +# Quick Start + +For the directory in the environmental variable `CONFLUENCE_HOME` that is used to store Confluence data +(amongst other things) we recommend mounting a host directory as a [data volume](https://docs.docker.com/userguide/dockervolumes/#mount-a-host-directory-as-a-data-volume): + +Start Atlassian Confluence Server: + + $> docker run -v /data/your-confluence-home:/var/atlassian/application-data/confluence --name="confluence" -d -p 8090:8090 -p 8091:8091 epicmorg/confluence + + +**Success**. Confluence is now available on [http://localhost:8090](http://localhost:8090)* + +Please ensure your container has the necessary resources allocated to it. +We recommend 2GiB of memory allocated to accommodate the application server. +See [Supported Platforms](https://confluence.atlassian.com/display/DOC/Supported+platforms) for further information. + + +_* Note: If you are using `docker-machine` on Mac OS X, please use `open http://$(docker-machine ip default):8090` instead._ + +## Memory / Heap Size + +If you need to override Confluence Server's default memory allocation, you can control the minimum heap (Xms) and maximum heap (Xmx) via the below environment variables. + +* `JVM_MINIMUM_MEMORY` (default: 1024m) + + The minimum heap size of the JVM + +* `JVM_MAXIMUM_MEMORY` (default: 1024m) + + The maximum heap size of the JVM + +## Reverse Proxy Settings + +If Confluence is run behind a reverse proxy server, then you need to specify extra options to make Confluence aware of the setup. They can be controlled via the below environment variables. + +* `CATALINA_CONNECTOR_PROXYNAME` (default: NONE) + + The reverse proxy's fully qualified hostname. + +* `CATALINA_CONNECTOR_PROXYPORT` (default: NONE) + + The reverse proxy's port number via which Confluence is accessed. + +* `CATALINA_CONNECTOR_SCHEME` (default: http) + + The protocol via which Confluence is accessed. + +* `CATALINA_CONNECTOR_SECURE` (default: false) + + Set 'true' if CATALINA_CONNECTOR_SCHEME is 'https'. + +## JVM configuration + +If you need to pass additional JVM arguments to Confluence such as specifying a custom trust store, you can add them via the below environment variable + +* `JVM_SUPPORT_RECOMMENDED_ARGS` + + Additional JVM arguments for Confluence + +Example: + + $> docker run -e JVM_SUPPORT_RECOMMENDED_ARGS=-Djavax.net.ssl.trustStore=/var/atlassian/application-data/confluence/cacerts -v confluenceVolume:/var/atlassian/application-data/confluence --name="confluence" -d -p 8090:8090 -p 8091:8091 epicmorg/confluence + + +# Upgrade + +To upgrade to a more recent version of Confluence Server you can simply stop the `Confluence` +container and start a new one based on a more recent image: + + $> docker stop confluence + $> docker rm confluence + $> docker run ... (see above) + +As your data is stored in the data volume directory on the host, it will still +be available after the upgrade. + +_Note: Please make sure that you **don't** accidentally remove the `confluence` +container and its volumes using the `-v` option._ + +# Backup + +For evaluating Confluence you can use the built-in database that will store its files in the Confluence Server home directory. In that case it is sufficient to create a backup archive of the directory on the host that is used as a volume (`/data/your-confluence-home` in the example above). + +Confluence's [automatic backup](https://confluence.atlassian.com/display/DOC/Configuring+Backups) is currently supported in the Docker setup. You can also use the [Production Backup Strategy](https://confluence.atlassian.com/display/DOC/Production+Backup+Strategy) approach if you're using an external database. + +Read more about data recovery and backups: [Site Backup and Restore](https://confluence.atlassian.com/display/DOC/Site+Backup+and+Restore) + +# Versioning + +The `latest` tag matches the most recent release of Atlassian Confluence Server. +So `epicmorg/confluence:latest` will use the newest stable version of Confluence Server available. + +Alternatively, you can use a specific minor version of Confluence Server by using a version number +tag: `epicmorg/confluence:5.10.8`. This will install the latest `5.10.8` version that +is available. + +## Versions available + +* `epicmorg/confluence:latest` +* `epicmorg/confluence:5.6.4` +* `epicmorg/confluence:5.10.8` + +# Known Problems +In Mac OS X with Docker version 1.11.0, when running with docker-machine, there is a bug where the directory specified for `CONFLUENCE_HOME` in a volume mount will not have the correct permission, and thus startup fails with a permission denied error: + Error writing state to confluence.cfg.xml +com.atlassian.config.ConfigurationException: Couldn't save confluence.cfg.xml to /var/atlassian/confluence-home directory. + +See https://github.com/docker/docker/issues/4023 for details. + +To work around this issue, use a different host operating system other than Mac OSX until a newer release of Docker fixes this issue. + +# Support + +This Docker image is great for evaluating Confluence. However, it does not use an Oracle JDK due to licensing constraints. Instead, it uses OpenJDK which is not supported for running Confluence in production. + +To meet our supported platform requirements, you'll need to build your own image based on [Oracle JDK](https://github.com/oracle/docker-images/tree/master/OracleJDK). See [Update the Confluence Docker image to use Oracle JDK ](https://confluence.atlassian.com/display/CONFKB/Update+the+Confluence+Docker+image+to+use+Oracle+JDK) for more info. + +For product support go to [support.atlassian.com](http://support.atlassian.com). + diff --git a/atlassian/confluence/6.1.2/entrypoint.sh b/atlassian/confluence/6.1.2/entrypoint.sh new file mode 100644 index 000000000..250fc031a --- /dev/null +++ b/atlassian/confluence/6.1.2/entrypoint.sh @@ -0,0 +1,39 @@ +#!/bin/bash +set -euo pipefail + +export JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::") +export JRE_HOME="$JAVA_HOME/jre" +export JAVA_BINARY="$JRE_HOME/bin/java" +export JAVA_VERSION=$("$JAVA_BINARY" -version 2>&1 | awk -F '"' '/version/ {print $2}') + + +# Setup Catalina Opts +: ${CATALINA_CONNECTOR_PROXYNAME:=} +: ${CATALINA_CONNECTOR_PROXYPORT:=} +: ${CATALINA_CONNECTOR_SCHEME:=http} +: ${CATALINA_CONNECTOR_SECURE:=false} + +: ${CATALINA_OPTS:=} + +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyName=${CATALINA_CONNECTOR_PROXYNAME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyPort=${CATALINA_CONNECTOR_PROXYPORT}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorScheme=${CATALINA_CONNECTOR_SCHEME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorSecure=${CATALINA_CONNECTOR_SECURE}" + +export CATALINA_OPTS + + +# Start Confluence as the correct user +if [ "${UID}" -eq 0 ]; then + echo "User is currently root. Will change directory ownership to ${RUN_USER}:${RUN_GROUP}, then downgrade permission to ${RUN_USER}" + PERMISSIONS_SIGNATURE=$(stat -c "%u:%U:%a" "${CONFLUENCE_HOME}") + EXPECTED_PERMISSIONS=$(id -u ${RUN_USER}):${RUN_USER}:700 + if [ "${PERMISSIONS_SIGNATURE}" != "${EXPECTED_PERMISSIONS}" ]; then + chmod -R 700 "${CONFLUENCE_HOME}" && + chown -R "${RUN_USER}:${RUN_GROUP}" "${CONFLUENCE_HOME}" + fi + # Now drop privileges + exec su -s /bin/bash "${RUN_USER}" -c "$CONFLUENCE_INSTALL_DIR/bin/start-confluence.sh $@" +else + exec "$CONFLUENCE_INSTALL_DIR/bin/start-confluence.sh" "$@" +fi diff --git a/atlassian/confluence/6.1.3/.docker-repository.yml b/atlassian/confluence/6.1.3/.docker-repository.yml new file mode 100644 index 000000000..efb9f8b2d --- /dev/null +++ b/atlassian/confluence/6.1.3/.docker-repository.yml @@ -0,0 +1 @@ +repository: epicmorg/confluence diff --git a/atlassian/confluence/6.1.3/.dockerignore b/atlassian/confluence/6.1.3/.dockerignore new file mode 100644 index 000000000..99176b278 --- /dev/null +++ b/atlassian/confluence/6.1.3/.dockerignore @@ -0,0 +1,3 @@ +.git +scripts +.idea \ No newline at end of file diff --git a/atlassian/confluence/6.1.3/Dockerfile b/atlassian/confluence/6.1.3/Dockerfile new file mode 100644 index 000000000..8bde4a010 --- /dev/null +++ b/atlassian/confluence/6.1.3/Dockerfile @@ -0,0 +1,46 @@ +FROM epicmorg/prod:jdk8 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ARG CONFLUENCE_VERSION=6.1.3 +ARG DOWNLOAD_URL=http://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-${CONFLUENCE_VERSION}.tar.gz + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/doc/confluence-home-and-other-important-directories-590259707.html +ENV CONFLUENCE_HOME /var/atlassian/application-data/confluence +ENV CONFLUENCE_INSTALL_DIR /opt/atlassian/confluence + +VOLUME ["${CONFLUENCE_HOME}"] +WORKDIR $CONFLUENCE_HOME + +# Expose HTTP and Synchrony ports +EXPOSE 8090 +EXPOSE 8091 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${CONFLUENCE_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$CONFLUENCE_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${CONFLUENCE_INSTALL_DIR}/ \ + && 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 \ + && sed -i -e 's/port="8090"/port="8090" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${CONFLUENCE_INSTALL_DIR}/conf/server.xml && \ + + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/atlassian/confluence/6.1.3/Makefile b/atlassian/confluence/6.1.3/Makefile new file mode 100644 index 000000000..5123e62e9 --- /dev/null +++ b/atlassian/confluence/6.1.3/Makefile @@ -0,0 +1,5 @@ +all: confl + +confl: + docker build --compress -t epicmorg/confluence:6.1.3 . + diff --git a/atlassian/confluence/6.1.3/README.md b/atlassian/confluence/6.1.3/README.md new file mode 100644 index 000000000..7e5b92f37 --- /dev/null +++ b/atlassian/confluence/6.1.3/README.md @@ -0,0 +1,131 @@ +![Atlassian Confluence Server](https://www.atlassian.com/dam/wac/legacy/confluence_logo_landing.png) + +Confluence Server is where you create, organise and discuss work with your team. Capture the knowledge that's too often lost in email inboxes and shared network drives in Confluence – where it's easy to find, use, and update. Give every team, project, or department its own space to create the things they need, whether it's meeting notes, product requirements, file lists, or project plans, you can get more done in Confluence. + +Learn more about Confluence Server: + +You can find the repository for this Dockerfile at + +# Overview + +This Docker container makes it easy to get an instance of Confluence up and running. + +# Quick Start + +For the directory in the environmental variable `CONFLUENCE_HOME` that is used to store Confluence data +(amongst other things) we recommend mounting a host directory as a [data volume](https://docs.docker.com/userguide/dockervolumes/#mount-a-host-directory-as-a-data-volume): + +Start Atlassian Confluence Server: + + $> docker run -v /data/your-confluence-home:/var/atlassian/application-data/confluence --name="confluence" -d -p 8090:8090 -p 8091:8091 epicmorg/confluence + + +**Success**. Confluence is now available on [http://localhost:8090](http://localhost:8090)* + +Please ensure your container has the necessary resources allocated to it. +We recommend 2GiB of memory allocated to accommodate the application server. +See [Supported Platforms](https://confluence.atlassian.com/display/DOC/Supported+platforms) for further information. + + +_* Note: If you are using `docker-machine` on Mac OS X, please use `open http://$(docker-machine ip default):8090` instead._ + +## Memory / Heap Size + +If you need to override Confluence Server's default memory allocation, you can control the minimum heap (Xms) and maximum heap (Xmx) via the below environment variables. + +* `JVM_MINIMUM_MEMORY` (default: 1024m) + + The minimum heap size of the JVM + +* `JVM_MAXIMUM_MEMORY` (default: 1024m) + + The maximum heap size of the JVM + +## Reverse Proxy Settings + +If Confluence is run behind a reverse proxy server, then you need to specify extra options to make Confluence aware of the setup. They can be controlled via the below environment variables. + +* `CATALINA_CONNECTOR_PROXYNAME` (default: NONE) + + The reverse proxy's fully qualified hostname. + +* `CATALINA_CONNECTOR_PROXYPORT` (default: NONE) + + The reverse proxy's port number via which Confluence is accessed. + +* `CATALINA_CONNECTOR_SCHEME` (default: http) + + The protocol via which Confluence is accessed. + +* `CATALINA_CONNECTOR_SECURE` (default: false) + + Set 'true' if CATALINA_CONNECTOR_SCHEME is 'https'. + +## JVM configuration + +If you need to pass additional JVM arguments to Confluence such as specifying a custom trust store, you can add them via the below environment variable + +* `JVM_SUPPORT_RECOMMENDED_ARGS` + + Additional JVM arguments for Confluence + +Example: + + $> docker run -e JVM_SUPPORT_RECOMMENDED_ARGS=-Djavax.net.ssl.trustStore=/var/atlassian/application-data/confluence/cacerts -v confluenceVolume:/var/atlassian/application-data/confluence --name="confluence" -d -p 8090:8090 -p 8091:8091 epicmorg/confluence + + +# Upgrade + +To upgrade to a more recent version of Confluence Server you can simply stop the `Confluence` +container and start a new one based on a more recent image: + + $> docker stop confluence + $> docker rm confluence + $> docker run ... (see above) + +As your data is stored in the data volume directory on the host, it will still +be available after the upgrade. + +_Note: Please make sure that you **don't** accidentally remove the `confluence` +container and its volumes using the `-v` option._ + +# Backup + +For evaluating Confluence you can use the built-in database that will store its files in the Confluence Server home directory. In that case it is sufficient to create a backup archive of the directory on the host that is used as a volume (`/data/your-confluence-home` in the example above). + +Confluence's [automatic backup](https://confluence.atlassian.com/display/DOC/Configuring+Backups) is currently supported in the Docker setup. You can also use the [Production Backup Strategy](https://confluence.atlassian.com/display/DOC/Production+Backup+Strategy) approach if you're using an external database. + +Read more about data recovery and backups: [Site Backup and Restore](https://confluence.atlassian.com/display/DOC/Site+Backup+and+Restore) + +# Versioning + +The `latest` tag matches the most recent release of Atlassian Confluence Server. +So `epicmorg/confluence:latest` will use the newest stable version of Confluence Server available. + +Alternatively, you can use a specific minor version of Confluence Server by using a version number +tag: `epicmorg/confluence:5.10.8`. This will install the latest `5.10.8` version that +is available. + +## Versions available + +* `epicmorg/confluence:latest` +* `epicmorg/confluence:5.6.4` +* `epicmorg/confluence:5.10.8` + +# Known Problems +In Mac OS X with Docker version 1.11.0, when running with docker-machine, there is a bug where the directory specified for `CONFLUENCE_HOME` in a volume mount will not have the correct permission, and thus startup fails with a permission denied error: + Error writing state to confluence.cfg.xml +com.atlassian.config.ConfigurationException: Couldn't save confluence.cfg.xml to /var/atlassian/confluence-home directory. + +See https://github.com/docker/docker/issues/4023 for details. + +To work around this issue, use a different host operating system other than Mac OSX until a newer release of Docker fixes this issue. + +# Support + +This Docker image is great for evaluating Confluence. However, it does not use an Oracle JDK due to licensing constraints. Instead, it uses OpenJDK which is not supported for running Confluence in production. + +To meet our supported platform requirements, you'll need to build your own image based on [Oracle JDK](https://github.com/oracle/docker-images/tree/master/OracleJDK). See [Update the Confluence Docker image to use Oracle JDK ](https://confluence.atlassian.com/display/CONFKB/Update+the+Confluence+Docker+image+to+use+Oracle+JDK) for more info. + +For product support go to [support.atlassian.com](http://support.atlassian.com). + diff --git a/atlassian/confluence/6.1.3/entrypoint.sh b/atlassian/confluence/6.1.3/entrypoint.sh new file mode 100644 index 000000000..250fc031a --- /dev/null +++ b/atlassian/confluence/6.1.3/entrypoint.sh @@ -0,0 +1,39 @@ +#!/bin/bash +set -euo pipefail + +export JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::") +export JRE_HOME="$JAVA_HOME/jre" +export JAVA_BINARY="$JRE_HOME/bin/java" +export JAVA_VERSION=$("$JAVA_BINARY" -version 2>&1 | awk -F '"' '/version/ {print $2}') + + +# Setup Catalina Opts +: ${CATALINA_CONNECTOR_PROXYNAME:=} +: ${CATALINA_CONNECTOR_PROXYPORT:=} +: ${CATALINA_CONNECTOR_SCHEME:=http} +: ${CATALINA_CONNECTOR_SECURE:=false} + +: ${CATALINA_OPTS:=} + +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyName=${CATALINA_CONNECTOR_PROXYNAME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyPort=${CATALINA_CONNECTOR_PROXYPORT}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorScheme=${CATALINA_CONNECTOR_SCHEME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorSecure=${CATALINA_CONNECTOR_SECURE}" + +export CATALINA_OPTS + + +# Start Confluence as the correct user +if [ "${UID}" -eq 0 ]; then + echo "User is currently root. Will change directory ownership to ${RUN_USER}:${RUN_GROUP}, then downgrade permission to ${RUN_USER}" + PERMISSIONS_SIGNATURE=$(stat -c "%u:%U:%a" "${CONFLUENCE_HOME}") + EXPECTED_PERMISSIONS=$(id -u ${RUN_USER}):${RUN_USER}:700 + if [ "${PERMISSIONS_SIGNATURE}" != "${EXPECTED_PERMISSIONS}" ]; then + chmod -R 700 "${CONFLUENCE_HOME}" && + chown -R "${RUN_USER}:${RUN_GROUP}" "${CONFLUENCE_HOME}" + fi + # Now drop privileges + exec su -s /bin/bash "${RUN_USER}" -c "$CONFLUENCE_INSTALL_DIR/bin/start-confluence.sh $@" +else + exec "$CONFLUENCE_INSTALL_DIR/bin/start-confluence.sh" "$@" +fi diff --git a/atlassian/confluence/6.1.4/.docker-repository.yml b/atlassian/confluence/6.1.4/.docker-repository.yml new file mode 100644 index 000000000..efb9f8b2d --- /dev/null +++ b/atlassian/confluence/6.1.4/.docker-repository.yml @@ -0,0 +1 @@ +repository: epicmorg/confluence diff --git a/atlassian/confluence/6.1.4/.dockerignore b/atlassian/confluence/6.1.4/.dockerignore new file mode 100644 index 000000000..99176b278 --- /dev/null +++ b/atlassian/confluence/6.1.4/.dockerignore @@ -0,0 +1,3 @@ +.git +scripts +.idea \ No newline at end of file diff --git a/atlassian/confluence/6.1.4/Dockerfile b/atlassian/confluence/6.1.4/Dockerfile new file mode 100644 index 000000000..57b685395 --- /dev/null +++ b/atlassian/confluence/6.1.4/Dockerfile @@ -0,0 +1,46 @@ +FROM epicmorg/prod:jdk8 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ARG CONFLUENCE_VERSION=6.1.4 +ARG DOWNLOAD_URL=http://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-${CONFLUENCE_VERSION}.tar.gz + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/doc/confluence-home-and-other-important-directories-590259707.html +ENV CONFLUENCE_HOME /var/atlassian/application-data/confluence +ENV CONFLUENCE_INSTALL_DIR /opt/atlassian/confluence + +VOLUME ["${CONFLUENCE_HOME}"] +WORKDIR $CONFLUENCE_HOME + +# Expose HTTP and Synchrony ports +EXPOSE 8090 +EXPOSE 8091 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${CONFLUENCE_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$CONFLUENCE_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${CONFLUENCE_INSTALL_DIR}/ \ + && 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 \ + && sed -i -e 's/port="8090"/port="8090" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${CONFLUENCE_INSTALL_DIR}/conf/server.xml && \ + + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/atlassian/confluence/6.1.4/Makefile b/atlassian/confluence/6.1.4/Makefile new file mode 100644 index 000000000..06c417023 --- /dev/null +++ b/atlassian/confluence/6.1.4/Makefile @@ -0,0 +1,5 @@ +all: confl + +confl: + docker build --compress -t epicmorg/confluence:6.1.4 . + diff --git a/atlassian/confluence/6.1.4/README.md b/atlassian/confluence/6.1.4/README.md new file mode 100644 index 000000000..7e5b92f37 --- /dev/null +++ b/atlassian/confluence/6.1.4/README.md @@ -0,0 +1,131 @@ +![Atlassian Confluence Server](https://www.atlassian.com/dam/wac/legacy/confluence_logo_landing.png) + +Confluence Server is where you create, organise and discuss work with your team. Capture the knowledge that's too often lost in email inboxes and shared network drives in Confluence – where it's easy to find, use, and update. Give every team, project, or department its own space to create the things they need, whether it's meeting notes, product requirements, file lists, or project plans, you can get more done in Confluence. + +Learn more about Confluence Server: + +You can find the repository for this Dockerfile at + +# Overview + +This Docker container makes it easy to get an instance of Confluence up and running. + +# Quick Start + +For the directory in the environmental variable `CONFLUENCE_HOME` that is used to store Confluence data +(amongst other things) we recommend mounting a host directory as a [data volume](https://docs.docker.com/userguide/dockervolumes/#mount-a-host-directory-as-a-data-volume): + +Start Atlassian Confluence Server: + + $> docker run -v /data/your-confluence-home:/var/atlassian/application-data/confluence --name="confluence" -d -p 8090:8090 -p 8091:8091 epicmorg/confluence + + +**Success**. Confluence is now available on [http://localhost:8090](http://localhost:8090)* + +Please ensure your container has the necessary resources allocated to it. +We recommend 2GiB of memory allocated to accommodate the application server. +See [Supported Platforms](https://confluence.atlassian.com/display/DOC/Supported+platforms) for further information. + + +_* Note: If you are using `docker-machine` on Mac OS X, please use `open http://$(docker-machine ip default):8090` instead._ + +## Memory / Heap Size + +If you need to override Confluence Server's default memory allocation, you can control the minimum heap (Xms) and maximum heap (Xmx) via the below environment variables. + +* `JVM_MINIMUM_MEMORY` (default: 1024m) + + The minimum heap size of the JVM + +* `JVM_MAXIMUM_MEMORY` (default: 1024m) + + The maximum heap size of the JVM + +## Reverse Proxy Settings + +If Confluence is run behind a reverse proxy server, then you need to specify extra options to make Confluence aware of the setup. They can be controlled via the below environment variables. + +* `CATALINA_CONNECTOR_PROXYNAME` (default: NONE) + + The reverse proxy's fully qualified hostname. + +* `CATALINA_CONNECTOR_PROXYPORT` (default: NONE) + + The reverse proxy's port number via which Confluence is accessed. + +* `CATALINA_CONNECTOR_SCHEME` (default: http) + + The protocol via which Confluence is accessed. + +* `CATALINA_CONNECTOR_SECURE` (default: false) + + Set 'true' if CATALINA_CONNECTOR_SCHEME is 'https'. + +## JVM configuration + +If you need to pass additional JVM arguments to Confluence such as specifying a custom trust store, you can add them via the below environment variable + +* `JVM_SUPPORT_RECOMMENDED_ARGS` + + Additional JVM arguments for Confluence + +Example: + + $> docker run -e JVM_SUPPORT_RECOMMENDED_ARGS=-Djavax.net.ssl.trustStore=/var/atlassian/application-data/confluence/cacerts -v confluenceVolume:/var/atlassian/application-data/confluence --name="confluence" -d -p 8090:8090 -p 8091:8091 epicmorg/confluence + + +# Upgrade + +To upgrade to a more recent version of Confluence Server you can simply stop the `Confluence` +container and start a new one based on a more recent image: + + $> docker stop confluence + $> docker rm confluence + $> docker run ... (see above) + +As your data is stored in the data volume directory on the host, it will still +be available after the upgrade. + +_Note: Please make sure that you **don't** accidentally remove the `confluence` +container and its volumes using the `-v` option._ + +# Backup + +For evaluating Confluence you can use the built-in database that will store its files in the Confluence Server home directory. In that case it is sufficient to create a backup archive of the directory on the host that is used as a volume (`/data/your-confluence-home` in the example above). + +Confluence's [automatic backup](https://confluence.atlassian.com/display/DOC/Configuring+Backups) is currently supported in the Docker setup. You can also use the [Production Backup Strategy](https://confluence.atlassian.com/display/DOC/Production+Backup+Strategy) approach if you're using an external database. + +Read more about data recovery and backups: [Site Backup and Restore](https://confluence.atlassian.com/display/DOC/Site+Backup+and+Restore) + +# Versioning + +The `latest` tag matches the most recent release of Atlassian Confluence Server. +So `epicmorg/confluence:latest` will use the newest stable version of Confluence Server available. + +Alternatively, you can use a specific minor version of Confluence Server by using a version number +tag: `epicmorg/confluence:5.10.8`. This will install the latest `5.10.8` version that +is available. + +## Versions available + +* `epicmorg/confluence:latest` +* `epicmorg/confluence:5.6.4` +* `epicmorg/confluence:5.10.8` + +# Known Problems +In Mac OS X with Docker version 1.11.0, when running with docker-machine, there is a bug where the directory specified for `CONFLUENCE_HOME` in a volume mount will not have the correct permission, and thus startup fails with a permission denied error: + Error writing state to confluence.cfg.xml +com.atlassian.config.ConfigurationException: Couldn't save confluence.cfg.xml to /var/atlassian/confluence-home directory. + +See https://github.com/docker/docker/issues/4023 for details. + +To work around this issue, use a different host operating system other than Mac OSX until a newer release of Docker fixes this issue. + +# Support + +This Docker image is great for evaluating Confluence. However, it does not use an Oracle JDK due to licensing constraints. Instead, it uses OpenJDK which is not supported for running Confluence in production. + +To meet our supported platform requirements, you'll need to build your own image based on [Oracle JDK](https://github.com/oracle/docker-images/tree/master/OracleJDK). See [Update the Confluence Docker image to use Oracle JDK ](https://confluence.atlassian.com/display/CONFKB/Update+the+Confluence+Docker+image+to+use+Oracle+JDK) for more info. + +For product support go to [support.atlassian.com](http://support.atlassian.com). + diff --git a/atlassian/confluence/6.1.4/entrypoint.sh b/atlassian/confluence/6.1.4/entrypoint.sh new file mode 100644 index 000000000..250fc031a --- /dev/null +++ b/atlassian/confluence/6.1.4/entrypoint.sh @@ -0,0 +1,39 @@ +#!/bin/bash +set -euo pipefail + +export JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::") +export JRE_HOME="$JAVA_HOME/jre" +export JAVA_BINARY="$JRE_HOME/bin/java" +export JAVA_VERSION=$("$JAVA_BINARY" -version 2>&1 | awk -F '"' '/version/ {print $2}') + + +# Setup Catalina Opts +: ${CATALINA_CONNECTOR_PROXYNAME:=} +: ${CATALINA_CONNECTOR_PROXYPORT:=} +: ${CATALINA_CONNECTOR_SCHEME:=http} +: ${CATALINA_CONNECTOR_SECURE:=false} + +: ${CATALINA_OPTS:=} + +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyName=${CATALINA_CONNECTOR_PROXYNAME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyPort=${CATALINA_CONNECTOR_PROXYPORT}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorScheme=${CATALINA_CONNECTOR_SCHEME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorSecure=${CATALINA_CONNECTOR_SECURE}" + +export CATALINA_OPTS + + +# Start Confluence as the correct user +if [ "${UID}" -eq 0 ]; then + echo "User is currently root. Will change directory ownership to ${RUN_USER}:${RUN_GROUP}, then downgrade permission to ${RUN_USER}" + PERMISSIONS_SIGNATURE=$(stat -c "%u:%U:%a" "${CONFLUENCE_HOME}") + EXPECTED_PERMISSIONS=$(id -u ${RUN_USER}):${RUN_USER}:700 + if [ "${PERMISSIONS_SIGNATURE}" != "${EXPECTED_PERMISSIONS}" ]; then + chmod -R 700 "${CONFLUENCE_HOME}" && + chown -R "${RUN_USER}:${RUN_GROUP}" "${CONFLUENCE_HOME}" + fi + # Now drop privileges + exec su -s /bin/bash "${RUN_USER}" -c "$CONFLUENCE_INSTALL_DIR/bin/start-confluence.sh $@" +else + exec "$CONFLUENCE_INSTALL_DIR/bin/start-confluence.sh" "$@" +fi