Confluence
Docker image to run Atlassian Confluence.
Building
docker build -rm -t registry.codemate.se/confluence .
Usage
It's as simple as:
docker pull registry.codemate.se/confluence
docker run -d registry.codemate.se/confluence
Customize exposed port
By default, the port 8091 (web interface) is mapped to a random port on the docker host. To customize, run:
docker run -p 8091:8091 -d registry.codemate.se/confluence
More info about port redirection can be found in the official Docker documentation.
Persist application data on the docker host
By default the application data is stored in the container in /home/confluence. You can map a directory on the host to this directory to store the application data outside of the container.
This is useful if you want to start containers using different versions of the image but with the same application data (including license) or if you want to backup this directory on the host. It also allows you to upgrade your server without losing your data:
docker run -v /data/confluence:/home/confluence -d registry.codemate.se/confluence
Running a different Confluence version
By default, the container downloads and installs Confluence v5.4.3 on the first boot. To specify which version to install, set the environment variable CONFLUENCE_VERSION:
docker run -e CONFLUENCE_VERSION=5.4.3 -d registry.codemate.se/confluence
Overiding Confluence files
By providing an environment variable name CONFLUENCE_OVERLAY that points to a gzipped tar file you can apply an overlay on the Confluence installation. This tarball will be unzipped and extracted in the root of the Confluence installation directory. The overlay enables you to add custom confluence configuratios such as SSL or Crowd integration.
docker run -e CONFLUENCE_OVERLAY=http://10.0.0.1/confluence-config.tgz -d registry.codemate.se/confluence
The overlay is fetched using curl so if you need to provide basic auth credentials simply prefix the url with the credentials, for example:
CONFLUENCE_OVERLAY="-u username:password http://10.0.0.1/confluence-config.tgz"
Combined options
The following example shows the options we use for our CI environment:
docker run -name confluence \
-e JAVA_OPTS=-Xmx1024m \
-e CONFLUENCE_VERSION=6.2 \
-e CONFLUENCE_OVERLAY=http://10.0.0.1/confluence-config.tgz \
-v /opt/application-data/confluence:/home/confluence \
-p 8091:8091 \
-d registry.codemate.se/confluence
Directories
-
/opt/atlassian-confluence-$CONFLUENCE_VERSION- Confluence installation directory -
/home/confluence- Confluence home directory (CONFLUENCE_HOME)
Variables
-
CONFLUENCE_HOME- Confluence home directory (default/home/confluence) -
CONFLUENCE_VERSION- The version to install an run (default6.2) -
CONFLUENCE_OVERLAY- A URL pointing to an tarball overlay
Exposed ports
-
8091- Confluence web interface