Update the Confluence Docker image to use Oracle JDK

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform Notice: Server and Data Center Only - This article only applies to Atlassian products on the server and data center platforms.

Purpose

Our official Docker image is a quick and easy choice for evaluating Confluence, but as it uses OpenJDK, it is not supported for running Confluence 6.12 or earlier in production. Due to terms in the Oracle license agreement, we're not able to provide you with an image that uses Oracle JDK.

To meet our supported platform requirements, you'll need to either

  • use our image that is based on AdoptOpenJDK 8, which is fully supported for Confluence 6.13 and later. These images are tagged with the suffix ubuntu-18.04-adoptopenjdk8 together with the Confluence version.
  • build your own image on an Oracle JDK based on Alpine (as our Dockerfile uses the apk command to include additional libraries). This article will guide you through the process.

Solution

Build a local Confluence image

  1. Head to https://bitbucket.org/atlassian-docker/docker-atlassian-confluence-server and download the repo.
  2. Edit the Dockerfile and change the OpenJDK image so that the Confluence image is created from an Oracle JDK image.

    FROM openjdk:8-jdk-alpine

    to 

    FROM anapsix/alpine-java:8_jdk
  3. Within the same Dockerfile, remove the lib6-compat library as it is already in the above anapsix image. Also re-order the update-ca-certificates command as such:

    RUN apk update -qq \
        && update-ca-certificates \
        && apk add ca-certificates wget curl openssh bash procps openssl perl ttf-dejavu tini libc6-compat \
        && rm -rf /var/lib/{apt,dpkg,cache,log}/ /tmp/* /var/tmp/*

    to

    RUN apk update -qq \
        && apk add ca-certificates wget curl openssh bash procps openssl perl ttf-dejavu tini \
        && update-ca-certificates \
        && rm -rf /var/lib/{apt,dpkg,cache,log}/ /tmp/* /var/tmp/*
  4. Build the Confluence image - See Build your own images in the Docker documentation for more information.


Note that the Atlassian Confluence Server Docker image is based on an Alpine based OpenJDK whereas the official Oracle Java on Docker image is based on Linux and hence the above example uses anapsix/alpine-java:8_jdk as the base image.


About Docker support

Atlassian support can assist you with problems related to Confluence, but we can't offer support for problems which are related to Docker itself. 

Description

Our official Docker image is a quick and easy choice for evaluating Confluence, but as it uses OpenJDK, it is not supported for running Confluence in production. Due to terms in the Oracle license agreement, we're not able to provide you with an image that uses Oracle JDK.

ProductConfluence
PlatformServer
Last modified on May 29, 2019

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.