The "apt-get" command in DockerFile is not work for oracle linux.

This question is in reference to Atlassian Documentation: Update the Confluence Docker image to use Oracle JDK

"Edit the docker file and change the OpenJDK image that the Confluence image is created from to your new Oracle JDK image. 

Change: 

FROM java:openjdk-8-jre

to 

FROM oracle/JDK:8"

However, the image "oracle/JDK:8" is based on oracle linux while openjdk is based on debian. And oracle linux is using "yum". So that the "apt-get" command in DockerFile is not found when running "docker build ...".

2 answers

I get the same message too

---> Running in fb573c0a912b
+ apt-get update --quiet
/bin/sh: apt-get: command not found

I commented out apt-get part and noticed tar command not there too. 

+ tar -xz --directory /opt/atlassian/confluence --strip-components=1 --no-same-owner
/bin/sh: tar: command not found

Oracle Linux uses yum not apt-get, so I wonder if this Dockerfile really tested before released it out..

I have same issue...

 

First, I edit Dockerfile.

#FROM openjdk:8u121-alpine
FROM oracle/serverjre:8 //

 

After, $ docker build ./

Step 13 has error.

Step 13/18 : RUN apk update -qq && update-ca-certificates && apk add ca-certificates wget curl openssh bash procps openssl perl ttf-dejavu tini && rm -rf /var/lib/{apt,dpkg,cache,log}/ /tmp/* /var/tmp/*
---> Running in 9767f435ac22
/bin/sh: apk: command not found
The command '/bin/sh -c apk update -qq && update-ca-certificates && apk add ca-certificates wget curl openssh bash procps openssl perl ttf-dejavu tini && rm -rf /var/lib/{apt,dpkg,cache,log}/ /tmp/* /var/tmp/*' returned a non-zero code: 127

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Friday in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

247 views 11 9
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you