patterndockerMajor
Is there no Oracle JDK for docker?
Viewed 0 times
dockerfororaclejdkthere
Problem
REPOSITORY TAG IMAGE ID CREATED SIZE
an-image 1 X 26 seconds ago 279 MBwhen the docker image will be run, the following message is shown:
No java installations was detected.
Please go to http://www.java.com/getjava/ and downloadWhen Oracle JDK is deployed the docker image size is more than doubled!
REPOSITORY TAG IMAGE ID CREATED SIZE
an-image 2 X 26 seconds ago 666 MBDiscussion
When "Is there no Oracle JDK for docker" is googled only some links to docker image that contain docker are returned. When Oracle JDK is deployed in the docker image the size is more than doubled. I want to keep the docker images as small as possible, but the Oracle JDK seems to be larger than the image itself!
Question
Is there no Oracle JDK for docker?
Solution
No. Because you cannot distribute Oracle JDK or JRE, the license in effect doesn't allow distribution. When distributed by a third party (embedded with your app) all the liability for it not working is on that party. This is why you will not find Oracle JDK/JRE on any of the public Docker registries, or in any Linux package repositories for that matter.
You can create your own image, and install Oracle JDK or JRE using the webupd8team/java package for Ubuntu/Debian.
And if you are using Alpine Linux this blog post explains which dependencies are required, and links to StackOverflow for installation instructions.
Update: Oracle has an official Docker image on the Docker Store now. https://blogs.oracle.com/developers/official-docker-image-for-oracle-java-and-the-openjdk-roadmap-for-containers
Link to Docker Store Oracle Java Image - https://store.docker.com/images/oracle-serverjre-8
You can create your own image, and install Oracle JDK or JRE using the webupd8team/java package for Ubuntu/Debian.
And if you are using Alpine Linux this blog post explains which dependencies are required, and links to StackOverflow for installation instructions.
Update: Oracle has an official Docker image on the Docker Store now. https://blogs.oracle.com/developers/official-docker-image-for-oracle-java-and-the-openjdk-roadmap-for-containers
Link to Docker Store Oracle Java Image - https://store.docker.com/images/oracle-serverjre-8
Context
StackExchange DevOps Q#433, answer score: 23
Revisions (0)
No revisions yet.