Skip to content

Latest commit

 

History

History
 
 

OracleJava

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Oracle Java in Containers

This repository contains sample container configurations to facilitate installation and environment setup for DevOps users. This project includes Dockerfiles based on Oracle Linux with JDK images of JDK 19, 17, 11, and for Server JRE 8.

Oracle Java Server JRE provides the features from Oracle Java JDK commonly required for server-side applications (i.e. Running a Java EE application server). For more information about Server JRE, visit the Understanding the Server JRE blog entry from the Java Product Management team.

Building the Oracle Java base image

For JDK 19 and 17 the required JDK binaries will be downloaded from Oracle as part of the build using curl.

For JDK 11 and Server JRE 8 you must download the linux x64 compressed archive (tar.gz) of the JDK or Server JRE for the version you want to create an image of and place it in the same directory as the corresponding Dockerfile.

e.g. for JDK 11 download jdk-11[X]_linux-x64_bin.tar.gz into OracleJava/11, for Server JRE 8 download server-jre-8uXXX-linux-x64.tar.gz into OracleJava/8

To build the container image run docker build. Tag it with the correct version number.

e.g. For JDK 19 run

$ cd ../OracleJava/19
$ docker build --tag oracle/jdk:19 .

for Server JRE 8 run

$ cd ../OracleJava/8
$ docker build --tag oracle/serverjre:8 .

The right command with the correct tag is already scripted in build.sh so you can alternatively run:

$ bash build.sh

Parent image OS version

The Oracle Java images for JDK 17 and 19 use oraclelinux:8 as the parent image. The Oracle Java image for JDK 11 and Server JRE 8 use oraclelinux:7-slim as the parent image.

JDK 11 and Server JRE 8 allow for optionally building on ghcr.io/oracle/oraclelinux8-compat:8-slim by using Dockerfile.8 rather than Dockerfile.

e.g. to build JDK 11 with Oracle Linux 8 rather than the default Oracle Linux 7 run

$ cd ../OracleJava/11
$ docker build --file Dockerfile.8 --tag oracle/jdk:11-oraclelinux8 .

On JDK 11 and Server JRE 8 build.sh can be used to build on Oracle Linux 8, by passing 8. e.g.

$ cd ../OracleJava/11
$ bash build.sh 8

The script build.sh will tag the images it creates with the JDK version, and with the operating system and OS version e.g., '17-oraclelinux8'.

Licenses

JDK 19 and 17 are downloaded, as part of the build process, from the Oracle Website under the Oracle No-Fee Terms and Conditions (NFTC).

For building JDK 11 and Server JRE 8 you must first download the corresponding Java Runtime from the Oracle Website and accept the license indicated on that page.

All scripts and files hosted in this project and GitHub docker/OracleJava repository, required to build the container images are, unless otherwise noted, released under the UPL 1.0 license.

Customer Support

Oracle offers support for JDK 19, JDK 17, JDK 11, and JDK 8 (Server JRE) when running on certified operating systems in a container. For additional details on the JDK Certified System Configurations, please refer to the Oracle Java SE Certified System Configuration Pages.