2019-12-01 06:34:40 +00:00
|
|
|
![Atlassian Confluence Server](https://wac-cdn.atlassian.com/dam/jcr:5d1374c2-276f-4bca-9ce4-813aba614b7a/confluence-icon-gradient-blue.svg?cdnVersion=696)
|
2019-09-04 03:18:01 +00:00
|
|
|
|
2019-08-14 23:22:52 +00:00
|
|
|
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
|
2019-09-09 03:26:28 +00:00
|
|
|
network drives in Confluence - where it's easy to find, use, and update. Give
|
2019-08-14 23:22:52 +00:00
|
|
|
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.
|
2019-09-04 03:18:01 +00:00
|
|
|
|
2016-05-26 04:29:16 +00:00
|
|
|
Learn more about Confluence Server: <https://www.atlassian.com/software/confluence>
|
2016-05-31 07:21:14 +00:00
|
|
|
|
|
|
|
You can find the repository for this Dockerfile at <https://hub.docker.com/r/atlassian/confluence-server>
|
2019-09-04 03:18:01 +00:00
|
|
|
|
|
|
|
# Contents
|
|
|
|
|
|
|
|
[TOC]
|
|
|
|
|
2016-05-26 04:29:16 +00:00
|
|
|
# Overview
|
2019-09-04 03:18:01 +00:00
|
|
|
|
2019-08-14 23:22:52 +00:00
|
|
|
This Docker container makes it easy to get an instance of Confluence up and
|
|
|
|
running.
|
2019-09-04 03:18:01 +00:00
|
|
|
|
2021-03-31 04:21:07 +00:00
|
|
|
*NOTE*: This Docker image is published as both `atlassian/confluence` and
|
|
|
|
`atlassian/confluence-server`. These are the same image, but the `-server`
|
2021-03-31 04:45:31 +00:00
|
|
|
version is deprecated and only kept for backwards-compatibility; for new
|
2021-03-31 04:21:07 +00:00
|
|
|
installations it is recommended to use the shorter name.
|
|
|
|
|
2022-07-20 03:30:24 +00:00
|
|
|
** Use docker version >= 20.10.10 **
|
2022-06-28 01:23:30 +00:00
|
|
|
|
2016-05-26 04:29:16 +00:00
|
|
|
# Quick Start
|
2019-09-04 03:18:01 +00:00
|
|
|
|
2019-08-13 02:28:06 +00:00
|
|
|
For the directory in the environmental variable `CONFLUENCE_HOME` that is used
|
|
|
|
to store Confluence data (amongst other things) we recommend mounting a host
|
2019-12-01 06:34:40 +00:00
|
|
|
directory as a [data volume][1]:
|
2019-08-13 02:28:06 +00:00
|
|
|
|
|
|
|
Additionally, if running Confluence in Data Center mode it is required that a
|
|
|
|
shared filesystem is mounted. The mountpoint (inside the container) can be
|
|
|
|
configured with `CONFLUENCE_SHARED_HOME`.
|
2019-09-04 03:18:01 +00:00
|
|
|
|
2016-05-26 04:29:16 +00:00
|
|
|
Start Atlassian Confluence Server:
|
2019-09-04 03:18:01 +00:00
|
|
|
|
2021-03-31 04:21:07 +00:00
|
|
|
docker run -v /data/your-confluence-home:/var/atlassian/application-data/confluence --name="confluence" -d -p 8090:8090 -p 8091:8091 atlassian/confluence
|
2019-09-04 03:18:01 +00:00
|
|
|
|
2016-05-31 07:21:14 +00:00
|
|
|
|
2019-08-14 23:27:43 +00:00
|
|
|
**Success**. Confluence is now available on <http://localhost:8090>*
|
2019-09-04 03:18:01 +00:00
|
|
|
|
2019-08-14 23:22:52 +00:00
|
|
|
Please ensure your container has the necessary resources allocated to it. We
|
|
|
|
recommend 2GiB of memory allocated to accommodate the application server. See
|
2019-12-01 06:34:40 +00:00
|
|
|
[Supported Platforms][3] for further information.
|
2019-09-04 03:18:01 +00:00
|
|
|
|
2016-05-26 04:29:16 +00:00
|
|
|
_* Note: If you are using `docker-machine` on Mac OS X, please use `open http://$(docker-machine ip default):8090` instead._
|
2019-09-04 03:18:01 +00:00
|
|
|
|
|
|
|
# Configuring Confluence
|
|
|
|
|
|
|
|
This Docker image is intended to be configured from its environment; the
|
|
|
|
provided information is used to generate the application configuration files
|
|
|
|
from templates. This allows containers to be repeatably created and destroyed
|
|
|
|
on-the-fly, as required in advanced cluster configurations. Most aspects of the
|
|
|
|
deployment can be configured in this manner; the necessary environment variables
|
|
|
|
are documented below. However, if your particular deployment scenario is not
|
|
|
|
covered by these settings, it is possible to override the provided templates
|
|
|
|
with your own; see the section _Advanced Configuration_ below.
|
|
|
|
|
2017-08-29 11:14:34 +00:00
|
|
|
## Memory / Heap Size
|
|
|
|
|
2019-08-14 23:22:52 +00:00
|
|
|
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.
|
2017-08-29 11:14:34 +00:00
|
|
|
|
|
|
|
* `JVM_MINIMUM_MEMORY` (default: 1024m)
|
|
|
|
|
|
|
|
The minimum heap size of the JVM
|
|
|
|
|
|
|
|
* `JVM_MAXIMUM_MEMORY` (default: 1024m)
|
|
|
|
|
|
|
|
The maximum heap size of the JVM
|
|
|
|
|
2020-02-06 09:42:48 +00:00
|
|
|
* `JVM_RESERVED_CODE_CACHE_SIZE` (default: 256m)
|
|
|
|
|
|
|
|
The reserved code cache size of the JVM
|
|
|
|
|
2019-08-08 00:48:07 +00:00
|
|
|
## Tomcat and Reverse Proxy Settings
|
2017-08-29 11:14:34 +00:00
|
|
|
|
2019-08-07 23:24:08 +00:00
|
|
|
If Confluence is run behind a reverse proxy server (e.g. a load-balancer or
|
|
|
|
nginx server), then you need to specify extra options to make Confluence aware
|
|
|
|
of the setup. They can be controlled via the below environment variables.
|
2017-08-29 11:14:34 +00:00
|
|
|
|
2019-08-07 23:24:08 +00:00
|
|
|
* `ATL_PROXY_NAME` (default: NONE)
|
2017-08-29 11:14:34 +00:00
|
|
|
|
2019-08-07 23:24:08 +00:00
|
|
|
The reverse proxy's fully qualified hostname. `CATALINA_CONNECTOR_PROXYNAME`
|
|
|
|
is also supported for backwards compatability.
|
2017-08-29 11:14:34 +00:00
|
|
|
|
2019-08-07 23:24:08 +00:00
|
|
|
* `ATL_PROXY_PORT` (default: NONE)
|
2017-08-29 11:14:34 +00:00
|
|
|
|
2019-08-13 02:18:08 +00:00
|
|
|
The reverse proxy's port number via which Confluence is
|
2019-08-07 23:24:08 +00:00
|
|
|
accessed. `CATALINA_CONNECTOR_PROXYPORT` is also supported for backwards
|
|
|
|
compatability.
|
2017-08-29 11:14:34 +00:00
|
|
|
|
2019-08-07 23:24:08 +00:00
|
|
|
* `ATL_TOMCAT_PORT` (default: 8090)
|
2017-08-29 11:14:34 +00:00
|
|
|
|
2019-08-13 02:18:08 +00:00
|
|
|
The port for Tomcat/Confluence to listen on. Depending on your container
|
2019-09-04 03:18:01 +00:00
|
|
|
deployment method this port may need to be
|
2019-08-07 23:24:08 +00:00
|
|
|
[exposed and published][docker-expose].
|
2017-08-29 11:14:34 +00:00
|
|
|
|
2019-08-07 23:24:08 +00:00
|
|
|
* `ATL_TOMCAT_SCHEME` (default: http)
|
2017-08-29 11:14:34 +00:00
|
|
|
|
2019-08-14 22:52:45 +00:00
|
|
|
The protocol via which Confluence is accessed. `CATALINA_CONNECTOR_SCHEME` is also
|
2019-08-07 23:24:08 +00:00
|
|
|
supported for backwards compatability.
|
2018-10-11 23:43:29 +00:00
|
|
|
|
2019-08-07 23:24:08 +00:00
|
|
|
* `ATL_TOMCAT_SECURE` (default: false)
|
|
|
|
|
|
|
|
Set 'true' if `ATL_TOMCAT_SCHEME` is 'https'. `CATALINA_CONNECTOR_SECURE` is
|
|
|
|
also supported for backwards compatability.
|
|
|
|
|
|
|
|
* `ATL_TOMCAT_CONTEXTPATH` (default: NONE)
|
|
|
|
|
|
|
|
The context path the application is served over. `CATALINA_CONTEXT_PATH` is
|
|
|
|
also supported for backwards compatability.
|
|
|
|
|
2022-01-13 01:50:04 +00:00
|
|
|
* `ATL_TOMCAT_ACCESS_LOG` (default: false [version < 7.11.0] and true [version >=7.11.0])
|
2020-02-28 03:30:20 +00:00
|
|
|
|
|
|
|
Whether to enable Tomcat access logging; set to `true` to enable. *NOTE*:
|
|
|
|
These logs are written to the Container internal volume by default (under
|
|
|
|
`/opt/atlassian/confluence/logs/`); these are rotated but not removed, and
|
|
|
|
will grow indefinitely. If you enable this functionality it is recommended
|
|
|
|
that you map the directory to a volume and perform log ingestion/cleanup with
|
|
|
|
external tools.
|
|
|
|
|
2019-08-07 23:24:08 +00:00
|
|
|
The following Tomcat/Catalina options are also supported. For more information,
|
2021-07-08 07:11:58 +00:00
|
|
|
see https://tomcat.apache.org/tomcat-7.0-doc/config/index.html
|
2019-08-07 23:24:08 +00:00
|
|
|
|
|
|
|
* `ATL_TOMCAT_MGMT_PORT` (default: 8000)
|
2021-07-08 07:11:58 +00:00
|
|
|
* `ATL_TOMCAT_MAXTHREADS` (default: 48)
|
2019-08-07 23:24:08 +00:00
|
|
|
* `ATL_TOMCAT_MINSPARETHREADS` (default: 10)
|
|
|
|
* `ATL_TOMCAT_CONNECTIONTIMEOUT` (default: 20000)
|
|
|
|
* `ATL_TOMCAT_ENABLELOOKUPS` (default: false)
|
2021-07-08 07:11:58 +00:00
|
|
|
* `ATL_TOMCAT_PROTOCOL` (default: org.apache.coyote.http11.Http11NioProtocol)
|
|
|
|
* `ATL_TOMCAT_REDIRECTPORT` (default: 8443)
|
2019-08-07 23:24:08 +00:00
|
|
|
* `ATL_TOMCAT_ACCEPTCOUNT` (default: 10)
|
2021-07-08 07:11:58 +00:00
|
|
|
* `ATL_TOMCAT_DEBUG` (default: 0)
|
|
|
|
* `ATL_TOMCAT_URIENCODING` (default: UTF-8)
|
2020-03-18 07:06:22 +00:00
|
|
|
* `ATL_TOMCAT_MAXHTTPHEADERSIZE` (default: 8192)
|
2017-08-29 11:14:34 +00:00
|
|
|
|
|
|
|
## JVM configuration
|
|
|
|
|
2019-08-14 23:22:52 +00:00
|
|
|
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
|
2017-08-29 11:14:34 +00:00
|
|
|
|
|
|
|
* `JVM_SUPPORT_RECOMMENDED_ARGS`
|
|
|
|
|
|
|
|
Additional JVM arguments for Confluence
|
2019-09-04 03:18:01 +00:00
|
|
|
|
2017-08-29 11:14:34 +00:00
|
|
|
Example:
|
|
|
|
|
2021-03-31 04:21:07 +00:00
|
|
|
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 atlassian/confluence
|
2017-08-29 11:14:34 +00:00
|
|
|
|
2019-08-13 02:18:08 +00:00
|
|
|
## Confluence-specific settings
|
|
|
|
|
|
|
|
* `ATL_AUTOLOGIN_COOKIE_AGE` (default: 1209600; two weeks, in seconds)
|
|
|
|
|
|
|
|
The maximum time a user can remain logged-in with 'Remember Me'.
|
2019-09-04 03:18:01 +00:00
|
|
|
|
2019-08-13 02:18:08 +00:00
|
|
|
* `CONFLUENCE_HOME`
|
|
|
|
|
|
|
|
The confluence home directory. This may be on an mounted volume; if so it
|
|
|
|
should be writable by the user `confluence`. See note below about UID
|
|
|
|
mappings.
|
|
|
|
|
2020-08-18 01:06:26 +00:00
|
|
|
* `ATL_LUCENE_INDEX_DIR`
|
|
|
|
|
|
|
|
The directory where [Lucene](https://lucene.apache.org/) search indexes should
|
|
|
|
be stored. Defaults to `index` under the Confluence home directory.
|
|
|
|
|
2020-09-22 15:59:03 +00:00
|
|
|
* `ATL_LICENSE_KEY` (from Confluence 7.9 onwards)
|
2020-09-10 19:29:39 +00:00
|
|
|
|
|
|
|
The Confluence license string. Providing this will remove the need to supply it through the web startup screen.
|
2022-06-21 12:19:12 +00:00
|
|
|
|
2020-11-23 22:45:18 +00:00
|
|
|
* *use with caution* `CONFLUENCE_LOG_STDOUT` `[true, false]` (from Confluence 7.9 onwards)
|
2020-11-11 22:30:32 +00:00
|
|
|
|
2022-06-21 12:19:12 +00:00
|
|
|
Prior to Confluence version 7.9.0, the log files are always stored in the `logs` folder in Confluence home. From version
|
2020-11-23 22:45:18 +00:00
|
|
|
7.9.0, the logs can be printed directly to the `stdout` and don't use the file at all. This makes it possible to fetch the log messages
|
|
|
|
via `docker logs <CONTAINER_ID>`. In this setup we recommend using some log aggregation tooling (e.g. AWS Cloudwatch or ELK stack).
|
2022-06-21 12:19:12 +00:00
|
|
|
|
2020-11-23 22:45:18 +00:00
|
|
|
**Beware, if enabled, the support ZIP produced by the Troubleshooting and Support plugin doesn't contain the application logs.**
|
2022-06-21 12:19:12 +00:00
|
|
|
|
2019-08-13 02:18:08 +00:00
|
|
|
## Database configuration
|
|
|
|
|
|
|
|
It is optionally possible to configure the database from the environment,
|
|
|
|
avoiding the need to do so through the web startup screen.
|
|
|
|
|
|
|
|
The following variables are all must all be supplied if using this feature:
|
|
|
|
|
|
|
|
* `ATL_JDBC_URL`
|
|
|
|
|
|
|
|
The database URL; this is database-specific.
|
|
|
|
|
|
|
|
* `ATL_JDBC_USER`
|
|
|
|
|
|
|
|
The database user to connect as.
|
|
|
|
|
|
|
|
* `ATL_JDBC_PASSWORD`
|
|
|
|
|
|
|
|
The password for the database user.
|
|
|
|
|
|
|
|
* `ATL_DB_TYPE`
|
|
|
|
|
|
|
|
The type of database; valid supported values are:
|
|
|
|
|
|
|
|
* `mssql`
|
|
|
|
* `mysql`
|
2021-03-05 00:01:03 +00:00
|
|
|
* `oracle12c` (Confluence 7.3.0 or earlier only)
|
|
|
|
* `oracle` (Confluence 7.3.1 or later only. Compatible with Oracle 12c and Oracle 19c)
|
2019-08-13 02:18:08 +00:00
|
|
|
* `postgresql`
|
|
|
|
|
2019-09-04 23:52:20 +00:00
|
|
|
Note: Due to licensing restrictions Confluence does not ship with a MySQL or
|
|
|
|
Oracle JDBC drivers. To use these databases you will need to copy a suitable
|
|
|
|
driver into the container and restart it. For example, to copy the MySQL driver
|
|
|
|
into a container named "confluence", you would do the following:
|
|
|
|
|
2020-05-06 01:46:23 +00:00
|
|
|
docker cp mysql-connector-java.x.y.z.jar confluence:/opt/atlassian/confluence/confluence/WEB-INF/lib
|
2019-09-04 23:52:20 +00:00
|
|
|
docker restart confluence
|
|
|
|
|
|
|
|
For more information see the [Database JDBC Drivers](https://confluence.atlassian.com/doc/database-jdbc-drivers-171742.html)
|
|
|
|
page.
|
|
|
|
|
|
|
|
### Optional database settings
|
|
|
|
|
2019-08-13 02:18:08 +00:00
|
|
|
The following variables are for the database connection pool, and are
|
|
|
|
optional.
|
|
|
|
|
|
|
|
* `ATL_DB_POOLMINSIZE` (default: 20)
|
|
|
|
* `ATL_DB_POOLMAXSIZE` (default: 100)
|
|
|
|
* `ATL_DB_TIMEOUT` (default: 30)
|
|
|
|
* `ATL_DB_IDLETESTPERIOD` (default: 100)
|
|
|
|
* `ATL_DB_MAXSTATEMENTS` (default: 0)
|
|
|
|
* `ATL_DB_VALIDATE` (default: false)
|
|
|
|
* `ATL_DB_ACQUIREINCREMENT` (default: 1)
|
|
|
|
* `ATL_DB_VALIDATIONQUERY` (default: "select 1")
|
|
|
|
|
|
|
|
## Data Center configuration
|
|
|
|
|
2019-12-01 06:34:40 +00:00
|
|
|
This docker image can be run as part of a [Data Center][4] cluster. You can
|
2019-08-14 23:22:52 +00:00
|
|
|
specify the following properties to start Confluence as a Data Center node,
|
|
|
|
instead of manually configuring a cluster. See [Installing Confluence Data
|
2019-12-01 06:34:40 +00:00
|
|
|
Center][5] for more information.
|
2019-08-13 02:18:08 +00:00
|
|
|
|
|
|
|
### Cluster configuration
|
|
|
|
|
|
|
|
Confluence Data Center allows clustering via various methods. For more
|
2019-12-01 06:34:40 +00:00
|
|
|
information on the setting for each type see [this page][6].
|
2019-08-13 02:18:08 +00:00
|
|
|
|
2019-08-16 00:33:42 +00:00
|
|
|
**NOTE:** The underlying network should be set-up to support the Confluence
|
|
|
|
clustering type you are using. How to do this depends on the container
|
|
|
|
management technology, and is beyond the scope of this documentation.
|
|
|
|
|
2019-08-13 02:18:08 +00:00
|
|
|
#### Common cluster settings
|
|
|
|
|
|
|
|
* `ATL_CLUSTER_TYPE`
|
|
|
|
|
|
|
|
The cluster type. Setting this effectively enables clustering. Valid values
|
|
|
|
are `aws`, `multicast`, and `tcp_ip`.
|
|
|
|
|
|
|
|
* `ATL_CLUSTER_NAME`
|
|
|
|
|
|
|
|
The cluster name; this should be common across all nodes.
|
|
|
|
|
|
|
|
* `ATL_PRODUCT_HOME_SHARED`
|
|
|
|
|
|
|
|
The location of the shared home directory for all Confluence nodes. **Note**:
|
|
|
|
This must be real shared filesystem that is mounted inside the
|
|
|
|
container. Additionally, see the note about UIDs.
|
|
|
|
|
|
|
|
* `ATL_CLUSTER_TTL`
|
|
|
|
|
|
|
|
The time-to-live for cluster packets. Primarily of use in multicast clusters.
|
|
|
|
|
2019-08-14 22:52:45 +00:00
|
|
|
#### AWS cluster settings
|
2019-08-13 02:18:08 +00:00
|
|
|
|
|
|
|
The following should be populated from the AWS environment.
|
|
|
|
|
|
|
|
* `ATL_HAZELCAST_NETWORK_AWS_IAM_ROLE`
|
|
|
|
* `ATL_HAZELCAST_NETWORK_AWS_IAM_REGION`
|
|
|
|
* `ATL_HAZELCAST_NETWORK_AWS_HOST_HEADER`
|
2019-08-13 04:21:29 +00:00
|
|
|
* `ATL_HAZELCAST_NETWORK_AWS_SECURITY_GROUP`
|
2019-08-13 02:18:08 +00:00
|
|
|
* `ATL_HAZELCAST_NETWORK_AWS_TAG_KEY`
|
|
|
|
* `ATL_HAZELCAST_NETWORK_AWS_TAG_VALUE`
|
|
|
|
|
|
|
|
#### TCP cluster settings
|
|
|
|
|
|
|
|
* `ATL_CLUSTER_PEERS`
|
|
|
|
|
|
|
|
A comma-separated list of peer IPs.
|
|
|
|
|
|
|
|
#### Multicast cluster settings
|
|
|
|
|
|
|
|
* `ATL_CLUSTER_ADDRESS`
|
|
|
|
|
2019-08-15 02:06:59 +00:00
|
|
|
The multicast address the cluster will communicate on.
|
2019-08-13 02:18:08 +00:00
|
|
|
|
2019-11-20 10:32:32 +00:00
|
|
|
## Container Configuration
|
|
|
|
|
2022-04-19 02:46:32 +00:00
|
|
|
* `ATL_FORCE_CFG_UPDATE` (default: false)
|
|
|
|
|
|
|
|
The Docker [entrypoint](entrypoint.py) generates application configuration on
|
|
|
|
first start; not all of these files are regenerated on subsequent
|
|
|
|
starts. This is deliberate, to avoid race conditions or overwriting manual
|
|
|
|
changes during restarts and upgrades. However in deployments where
|
|
|
|
configuration is purely specified through the environment (e.g. Kubernetes)
|
2022-04-19 02:51:11 +00:00
|
|
|
this behaviour may be undesirable; this flag forces an update of all
|
|
|
|
generated files.
|
2022-06-21 12:19:12 +00:00
|
|
|
|
2022-04-19 02:52:24 +00:00
|
|
|
In Confluence the affected files are: `confluence.cfg.xml`
|
2022-06-21 12:19:12 +00:00
|
|
|
|
2022-04-19 02:51:11 +00:00
|
|
|
See [the entrypoint code](entrypoint.py) for the details of how configuration
|
|
|
|
files are generated.
|
2022-06-21 12:19:12 +00:00
|
|
|
|
2019-11-20 10:32:32 +00:00
|
|
|
* `SET_PERMISSIONS` (default: true)
|
|
|
|
|
|
|
|
Define whether to set home directory permissions on startup. Set to `false` to disable
|
|
|
|
this behaviour.
|
|
|
|
|
2019-09-04 03:18:01 +00:00
|
|
|
## Advanced Configuration
|
|
|
|
|
|
|
|
As mentioned at the top of this section, the settings from the environment are
|
|
|
|
used to populate the application configuration on the container startup. However
|
|
|
|
in some cases you may wish to customise the settings in ways that are not
|
|
|
|
supported by the environment variables above. In this case, it is possible to
|
|
|
|
modify the base templates to add your own configuration. There are three main
|
|
|
|
ways of doing this; modify our repository to your own image, build a new image
|
|
|
|
from the existing one, or provide new templates at startup. We will briefly
|
2019-09-04 22:45:25 +00:00
|
|
|
outline this methods here, but in practice how you do this will depend on your
|
2019-09-04 03:18:01 +00:00
|
|
|
needs.
|
|
|
|
|
|
|
|
#### Building your own image
|
|
|
|
|
|
|
|
* Clone the Atlassian repository at https://bitbucket.org/atlassian-docker/docker-atlassian-confluence-server/
|
|
|
|
* Modify or replace the [Jinja](https://jinja.palletsprojects.com/) templates
|
|
|
|
under `config`; _NOTE_: The files must have the `.j2` extensions. However you
|
|
|
|
don't have to use template variables if you don't wish.
|
|
|
|
* Build the new image with e.g: `docker build --tag my-confluence-image --build-arg CONFLUENCE_VERSION=6.x.x .`
|
|
|
|
* Optionally push to a registry, and deploy.
|
|
|
|
|
|
|
|
#### Build a new image from the existing one
|
|
|
|
|
2021-03-31 04:21:07 +00:00
|
|
|
* Create a new `Dockerfile`, which starts with the line e.g: `FROM atlassian/confluence:latest`.
|
2019-09-04 03:18:01 +00:00
|
|
|
* Use a `COPY` line to overwrite the provided templates.
|
|
|
|
* Build, push and deploy the new image as above.
|
|
|
|
|
|
|
|
#### Overwrite the templates at runtime
|
|
|
|
|
|
|
|
There are two main ways of doing this:
|
|
|
|
|
|
|
|
* If your container is going to be long-lived, you can create it, modify the
|
|
|
|
installed templates under `/opt/atlassian/etc/`, and then run it.
|
|
|
|
* Alternatively, you can create a volume containing your alternative templates,
|
|
|
|
and mount it over the provided templates at runtime
|
|
|
|
with `--volume my-config:/opt/atlassian/etc/`.
|
|
|
|
|
2019-08-13 02:18:08 +00:00
|
|
|
# Shared directory and user IDs
|
|
|
|
|
|
|
|
By default the Confuence application runs as the user `confluence`, with a UID
|
|
|
|
and GID of 2002. Consequently this UID must have write access to the shared
|
|
|
|
filesystem. If for some reason a different UID must be used, there are a number
|
|
|
|
of options available:
|
|
|
|
|
|
|
|
* The Docker image can be rebuilt with a different UID.
|
2019-09-04 03:18:01 +00:00
|
|
|
* Under Linux, the UID can be remapped using
|
2019-12-01 06:34:40 +00:00
|
|
|
[user namespace remapping][7].
|
2019-09-04 03:18:01 +00:00
|
|
|
|
2019-09-06 00:38:05 +00:00
|
|
|
To preserve strict permissions for certain configuration files, this container starts as
|
|
|
|
`root` to perform bootstrapping before running Confluence under a non-privileged user
|
|
|
|
account. If you wish to start the container as a non-root user, please note that Tomcat
|
|
|
|
configuration, and the bootstrapping of seraph-config.xml (SSO) &
|
|
|
|
confluence-init.properties (overriding `$CONFLUENCE_HOME`) will be skipped and a warning
|
|
|
|
will be logged. You may still apply custom configuration in this situation by mounting a
|
|
|
|
custom file directly, e.g. by mounting your own server.xml file directly to
|
|
|
|
`/opt/atlassian/confluence/conf/server.xml`
|
|
|
|
|
|
|
|
Database and Clustering bootstrapping will work as expected when starting this container
|
|
|
|
as a non-root user.
|
|
|
|
|
2016-05-26 04:29:16 +00:00
|
|
|
# Upgrade
|
2019-09-04 03:18:01 +00:00
|
|
|
|
2019-08-14 23:22:52 +00:00
|
|
|
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:
|
2019-09-04 03:18:01 +00:00
|
|
|
|
|
|
|
docker stop confluence
|
|
|
|
docker rm confluence
|
|
|
|
docker run ... (see above)
|
|
|
|
|
2016-05-26 04:29:16 +00:00
|
|
|
As your data is stored in the data volume directory on the host, it will still
|
|
|
|
be available after the upgrade.
|
2019-09-04 03:18:01 +00:00
|
|
|
|
2016-05-26 04:29:16 +00:00
|
|
|
_Note: Please make sure that you **don't** accidentally remove the `confluence`
|
|
|
|
container and its volumes using the `-v` option._
|
2019-09-04 03:18:01 +00:00
|
|
|
|
2016-05-26 04:29:16 +00:00
|
|
|
# Backup
|
2019-09-04 03:18:01 +00:00
|
|
|
|
2019-08-13 02:18:08 +00:00
|
|
|
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).
|
2019-09-04 03:18:01 +00:00
|
|
|
|
2019-12-01 06:34:40 +00:00
|
|
|
Confluence's [automatic backup][8] is currently supported in the Docker
|
|
|
|
setup. You can also use the [Production Backup Strategy][9] approach if you're
|
2019-08-14 23:22:52 +00:00
|
|
|
using an external database.
|
2019-09-04 03:18:01 +00:00
|
|
|
|
2019-12-01 06:34:40 +00:00
|
|
|
Read more about data recovery and backups: [Site Backup and Restore][10]
|
2019-09-04 03:18:01 +00:00
|
|
|
|
2021-08-26 05:08:52 +00:00
|
|
|
# Shutdown
|
|
|
|
|
|
|
|
Confluence allows a grace period of 20s for active operations to finish before
|
|
|
|
termination. If sending a `docker stop` this should be taken into account with
|
|
|
|
the `--time` flag.
|
|
|
|
|
|
|
|
Alternatively, the script `/shutdown-wait.sh` is provided, which will initiate a
|
|
|
|
clean shutdown and wait for the process to complete. This is the recommended
|
|
|
|
method for shutdown in environments which provide for orderly shutdown,
|
|
|
|
e.g. Kubernetes via the `preStop` hook.
|
|
|
|
|
2016-05-26 04:29:16 +00:00
|
|
|
# Versioning
|
2018-11-28 01:34:43 +00:00
|
|
|
|
2020-09-21 06:59:04 +00:00
|
|
|
The `latest` tag matches the most recent official release of Atlassian Confluence Server.
|
2021-03-31 04:21:07 +00:00
|
|
|
So `atlassian/confluence:latest` will use the newest stable version of
|
2019-08-13 02:18:08 +00:00
|
|
|
Confluence Server available.
|
2019-09-04 03:18:01 +00:00
|
|
|
|
2019-08-13 02:18:08 +00:00
|
|
|
Alternatively, you can use a specific minor version of Confluence Server by
|
2022-06-21 12:19:12 +00:00
|
|
|
using a version number tag: `atlassian/confluence:7.13`. This will
|
|
|
|
install the latest `7.13.x` version that is available.
|
2016-06-03 03:10:49 +00:00
|
|
|
|
2020-09-21 06:59:04 +00:00
|
|
|
We also publish docker images for our [EAP releases](https://www.atlassian.com/software/confluence/download-eap) (not
|
|
|
|
supported for use in production). The tag for EAP releases is the EAP version.
|
2021-03-31 04:21:07 +00:00
|
|
|
For example to get the `7.8.0-beta1` EAP release, use `atlassian/confluence:7.8.0-beta1`.
|
2018-11-28 01:34:43 +00:00
|
|
|
|
2022-06-21 12:19:12 +00:00
|
|
|
For example, `atlassian/confluence:7.13-ubuntu-jdk11` will
|
|
|
|
install the latest 7.13.x version with Eclipse Temurin OpenJDK 11.
|
2019-09-04 03:18:01 +00:00
|
|
|
|
2021-09-16 04:16:26 +00:00
|
|
|
# Supported JDK versions
|
|
|
|
|
|
|
|
All the Atlassian Docker images are now JDK11 only, and generated from the
|
2022-06-21 12:19:12 +00:00
|
|
|
[official Eclipse Temurin OpenJDK Docker images](https://hub.docker.com/_/eclipse-temurin).
|
2021-09-16 04:16:26 +00:00
|
|
|
|
|
|
|
The Docker images follow the [Atlassian Support end-of-life
|
|
|
|
policy](https://confluence.atlassian.com/support/atlassian-support-end-of-life-policy-201851003.html);
|
|
|
|
images for unsupported versions of the products remain available but will no longer
|
|
|
|
receive updates or fixes.
|
|
|
|
|
|
|
|
Historically, we have also generated other versions of the images, including
|
|
|
|
JDK8, Alpine, and 'slim' versions of the JDK. These legacy images still exist in
|
|
|
|
Docker Hub, however they should be considered deprecated, and do not receive
|
|
|
|
updates or fixes.
|
|
|
|
|
|
|
|
If for some reason you need a different version, see "Building your own image"
|
|
|
|
above.
|
|
|
|
|
2022-04-22 01:27:34 +00:00
|
|
|
# Supported architectures
|
|
|
|
|
|
|
|
Currently the Atlassian Docker images are built for the `linux/amd64` target
|
|
|
|
platform; we do not have other architectures on our roadmap at this
|
|
|
|
point. However the Dockerfiles and support tooling have now had all
|
|
|
|
architecture-specific components removed, so if necessary it is possible to
|
|
|
|
build images for any platform supported by Docker.
|
|
|
|
|
|
|
|
## Building on the target architecture
|
|
|
|
|
|
|
|
Note: This method is known to work on Mac M1 and AWS ARM64 machines, but has not
|
|
|
|
be extensively tested.
|
|
|
|
|
|
|
|
The simplest method of getting a platform image is to build it on a target
|
|
|
|
machine. The following assumes you have git and Docker installed. You will also
|
|
|
|
need to know which version of Confluence you want to build; substitute
|
|
|
|
`CONFLUENCE_VERSION=x.x.x` with your required version:
|
|
|
|
|
|
|
|
```
|
|
|
|
git clone --recurse-submodule https://bitbucket.org/atlassian-docker/docker-atlassian-confluence-server.git
|
|
|
|
cd docker-atlassian-confluence-server
|
|
|
|
docker build --tag my-image --build-arg CONFLUENCE_VERSION=x.x.x .
|
|
|
|
```
|
|
|
|
This image can be pushed up to your own Docker Hub or private repository.
|
|
|
|
|
2019-11-20 09:54:20 +00:00
|
|
|
# Troubleshooting
|
|
|
|
|
|
|
|
These images include built-in scripts to assist in performing common JVM diagnostic tasks.
|
|
|
|
|
|
|
|
## Thread dumps
|
|
|
|
|
|
|
|
`/opt/atlassian/support/thread-dumps.sh` can be run via `docker exec` to easily trigger the collection of thread
|
|
|
|
dumps from the containerized application. For example:
|
|
|
|
|
|
|
|
docker exec my_container /opt/atlassian/support/thread-dumps.sh
|
|
|
|
|
|
|
|
By default this script will collect 10 thread dumps at 5 second intervals. This can
|
|
|
|
be overridden by passing a custom value for the count and interval, by using `-c` / `--count`
|
|
|
|
and `-i` / `--interval` respectively. For example, to collect 20 thread dumps at 3 second intervals:
|
|
|
|
|
|
|
|
docker exec my_container /opt/atlassian/support/thread-dumps.sh --count 20 --interval 3
|
|
|
|
|
|
|
|
Thread dumps will be written to `$APP_HOME/thread_dumps/<date>`.
|
|
|
|
|
|
|
|
Note: By default this script will also capture output from top run in 'Thread-mode'. This can
|
|
|
|
be disabled by passing `-n` / `--no-top`
|
|
|
|
|
|
|
|
## Heap dump
|
|
|
|
|
|
|
|
`/opt/atlassian/support/heap-dump.sh` can be run via `docker exec` to easily trigger the collection of a heap
|
|
|
|
dump from the containerized application. For example:
|
|
|
|
|
|
|
|
docker exec my_container /opt/atlassian/support/heap-dump.sh
|
|
|
|
|
|
|
|
A heap dump will be written to `$APP_HOME/heap.bin`. If a file already exists at this
|
|
|
|
location, use `-f` / `--force` to overwrite the existing heap dump file.
|
|
|
|
|
|
|
|
## Manual diagnostics
|
|
|
|
|
|
|
|
The `jcmd` utility is also included in these images and can be used by starting a `bash` shell
|
|
|
|
in the running container:
|
|
|
|
|
|
|
|
docker exec -it my_container /bin/bash
|
|
|
|
|
2016-06-09 03:22:16 +00:00
|
|
|
# Support
|
2016-06-20 23:55:48 +00:00
|
|
|
|
2020-02-05 00:46:37 +00:00
|
|
|
For product support, go to
|
2020-03-18 07:06:22 +00:00
|
|
|
[support.atlassian.com](https://support.atlassian.com/confluence-server/).
|
2016-06-20 23:55:48 +00:00
|
|
|
|
2021-09-16 04:16:26 +00:00
|
|
|
You can also visit the [Atlassian Data Center on
|
2021-09-20 01:42:30 +00:00
|
|
|
Kubernetes](https://community.atlassian.com/t5/Atlassian-Data-Center-on/gh-p/DC_Kubernetes)
|
2021-09-16 04:16:26 +00:00
|
|
|
forum for discussion on running Atlassian Data Center products in containers.
|
2021-05-31 06:15:29 +00:00
|
|
|
|
2020-03-03 05:34:39 +00:00
|
|
|
# Contribution
|
|
|
|
|
|
|
|
See the [contributing guideline](CONTRIBUTING.md) if you are contributing from outside Atlassian.
|
|
|
|
|
2022-05-04 03:55:51 +00:00
|
|
|
# Changelog
|
|
|
|
|
|
|
|
For a detailed list of changes to the Docker image configuration see [the Git
|
|
|
|
commit history](https://bitbucket.org/atlassian-docker/docker-atlassian-confluence-server/commits/).
|
|
|
|
|
2019-08-18 22:41:43 +00:00
|
|
|
# License
|
|
|
|
|
2020-02-05 00:46:37 +00:00
|
|
|
Copyright © 2020 Atlassian Corporation Pty Ltd.
|
2019-08-18 22:41:43 +00:00
|
|
|
Licensed under the Apache License, Version 2.0.
|
|
|
|
|
2019-12-01 06:34:40 +00:00
|
|
|
[1]: https://docs.docker.com/userguide/dockervolumes/#mount-a-host-directory-as-a-data-volume
|
|
|
|
[3]: https://confluence.atlassian.com/display/DOC/Supported+platforms
|
|
|
|
[4]: https://confluence.atlassian.com/doc/confluence-data-center-technical-overview-790795847.html
|
|
|
|
[5]: https://confluence.atlassian.com/doc/installing-confluence-data-center-203603.html
|
|
|
|
[6]: https://confluence.atlassian.com/doc/change-node-discovery-from-multicast-to-tcp-ip-or-aws-792297728.html#ChangeNodeDiscoveryfromMulticasttoTCP/IPorAWS-TochangefromTCP/IPtomulticast
|
|
|
|
[7]: https://docs.docker.com/engine/security/userns-remap/
|
|
|
|
[8]: https://confluence.atlassian.com/display/DOC/Configuring+Backups
|
|
|
|
[9]: https://confluence.atlassian.com/display/DOC/Production+Backup+Strategy
|
|
|
|
[10]: https://confluence.atlassian.com/display/DOC/Site+Backup+and+Restore
|
|
|
|
[12]: https://confluence.atlassian.com/doc/confluence-6-13-release-notes-959288785.html
|