Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Docker build fails building confluence

Volkan Tas
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 12, 2018

The confluence docker image page states that the product is not supported under openJDK and suggests building with oracleJDK.

https://hub.docker.com/r/atlassian/confluence-server/

When the advice on the following page is followed:

https://confluence.atlassian.com/confkb/update-the-confluence-docker-image-to-use-oracle-jdk-829062521.html

the line from the confluence docker image is changed from:

FROM openjdk:8-jdk-alpine

to:

FROM oracle/serverjre:9

This causes an error when building the confluence image with the new base image:

/bin/sh: apk: command not found

 This makes sense as apk is a package manager for alpine and I just removed it when changing the base image.

There is a clear conflict when following instructions to create a supported docker image. 

How can I create a supported docker image? 

2 answers

0 votes
Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 17, 2018

Hi Volkan, 

I found a few more suggestions online for users trying to build a Alpine based docker image. Perhaps they could help you?

  1. Try apk update and apk add, or
  2. RUN apk add --no-cache bash (keeps the image small) or
  3. Someone also mentioned to try using RUN /bin/sh instead of bash, or even RUN /bin/sh -c "apk add --no-cache bash"

Let us know if you have any success.

Regards,

Shannon

0 votes
AnnWorley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 16, 2018

The way I understand the documentation, you download and install the Oracle JDK before the build and then you won't need a package manager to install it, you would use:

FROM oracle/JDK:8

Please note that JRE 9 is not a supported platform for Confluence 6.6.x: Supported Platforms

Volkan Tas
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 16, 2018

Thank you for pointing out that JRE 9 is not supported.

The apk package manager is not being used to download and install Oracle JDK. That process is done in a previous step. 

The second build process uses the apk package manager to do the following: 

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/*

That is within the confluence docker file at:

https://bitbucket.org/atlassian/docker-atlassian-confluence-server/src/37d9ecc3ad569e0c49935e6ee296ddc46bc2c0fa/Dockerfile?at=base-6&fileviewer=file-view-default

Which is where the build process fails.  

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events