How to add prerequisites for Graphviz App when Confluence Data Center run in containerised environment

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

Graphviz app requires some additional OS packages to render graphs in Confluence pages. Installing such packages may not be straightforward when Confluence is running in Kubernetes or Docker.

Diagnosis

  • Install Graphviz app on Conflunece DC running in Kubernetes or Docker.

  • Create a new page and add the Graphviz macro in it.

The macro is not rendered.

Cause

The container running Confluence does not have Graphviz OS packages installed.

Solution

  1. Edit your current values.yaml and add the below entries in the confluence section:

    1 2 3 4 5 6 confluence: [...] postStart: command: | apt update apt install -y graphviz* >/tmp/graphviz_install.log 2>&1
  2. Update the current deployment running (replacing accordingly $CONFLUENCE_RELEASE_NAME$ and $CONFLUENCE_NAMESPACE$).

    1 helm upgrade $CONFLUENCE_RELEASE_NAME$ atlassian-data-center/confluence --namespace $CONFLUENCE_NAMESPACE$ --values connie-values.yaml
  3. Create a Dockerfile with the below content:

    1 2 FROM atlassian/confluence:8.5.11 RUN apt update && apt install -y graphviz*
  4. Build a new Confluence images with image tag 8.5.11g

    1 docker build -t atlassian/confluence:8.5.11g .
  5. Push the images to the registry accessible by your Kubernetes cluster where Confluence run.

Updated on March 13, 2025

Still need help?

The Atlassian Community is here for you.