Skip to content

Commit 94172f4

Browse files
authored
Merge pull request #237 from jmtd/jdk17-runtime
Initial Jdk17 runtime image
2 parents 5277d57 + 89a87e4 commit 94172f4

File tree

5 files changed

+139
-0
lines changed

5 files changed

+139
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
#!/bin/sh
3+
# ==============================================================================
4+
# JDK specific customizations
5+
#
6+
# ==============================================================================
7+
8+
function jvm_specific_diagnostics() {
9+
echo "-Xlog:gc::utctime -XX:NativeMemoryTracking=summary"
10+
}

modules/jre/17/configure.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/sh
2+
# Configure module
3+
set -e
4+
5+
SCRIPT_DIR=$(dirname $0)
6+
echo $SCRIPT_DIR
7+
ARTIFACTS_DIR=${SCRIPT_DIR}/artifacts
8+
echo $ARTIFACTS_DIR
9+
10+
chown -R jboss:root $SCRIPT_DIR
11+
chmod -R ug+rwX $SCRIPT_DIR
12+
chmod ug+x ${ARTIFACTS_DIR}/opt/jboss/container/openjdk/jre/*
13+
14+
pushd ${ARTIFACTS_DIR}
15+
cp -pr * /
16+
popd
17+
18+
# Set this JDK as the alternative in use
19+
_arch="$(uname -i)"
20+
alternatives --set java java-17-openjdk.${_arch}

modules/jre/17/module.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
schema_version: 1
2+
3+
name: "jboss.container.openjdk.jre"
4+
description: "Installs only the JRE headless for OpenJDK 17."
5+
version: "17"
6+
7+
labels:
8+
- name: "org.jboss.product"
9+
value: "openjdk"
10+
- name: "org.jboss.product.version"
11+
value: "17"
12+
- name: "org.jboss.product.openjdk.version"
13+
value: "17"
14+
15+
envs:
16+
- name: "JAVA_HOME"
17+
value: "/usr/lib/jvm/jre"
18+
- name: "JAVA_VENDOR"
19+
value: "openjdk"
20+
- name: "JAVA_VERSION"
21+
value: "17"
22+
- name: JBOSS_CONTAINER_OPENJDK_JRE_MODULE
23+
value: /opt/jboss/container/openjdk/jre
24+
25+
packages:
26+
install:
27+
- java-17-openjdk-headless
28+
29+
modules:
30+
install:
31+
- name: jboss.container.user
32+
33+
execute:
34+
- script: configure.sh

redhat/ubi8-openjdk-17-runtime.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
osbs:
2+
configuration:
3+
container:
4+
compose:
5+
pulp_repos: true
6+
packages: []
7+
signing_intent: unsigned
8+
repository:
9+
name: containers/openjdk
10+
branch: openjdk-17-runtime-ubi8
11+
12+
packages:
13+
manager: microdnf
14+
content_sets:
15+
x86_64:
16+
- rhel-8-for-x86_64-baseos-rpms__8
17+
- rhel-8-for-x86_64-appstream-rpms__8
18+
ppc64le:
19+
- rhel-8-for-ppc64le-appstream-rpms__8
20+
- rhel-8-for-ppc64le-baseos-rpms__8
21+
aarch64:
22+
- rhel-8-for-aarch64-baseos-rpms__8
23+
- rhel-8-for-aarch64-appstream-rpms__8
24+
s390x:
25+
- rhel-8-for-s390x-baseos-rpms__8
26+
- rhel-8-for-s390x-appstream-rpms__8

ubi8-openjdk-17-runtime.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# This is an Image descriptor for Cekit
2+
3+
schema_version: 1
4+
5+
from: "ubi8-minimal:8.5"
6+
name: &name "ubi8/openjdk-17-runtime"
7+
version: &version "1.10"
8+
description: "Image for Red Hat OpenShift providing OpenJDK 17 runtime"
9+
10+
labels:
11+
- name: "io.k8s.description"
12+
value: "Platform for running plain Java applications (fat-jar and flat classpath)"
13+
- name: "io.k8s.display-name"
14+
value: "Java Applications"
15+
- name: "io.openshift.tags"
16+
value: "java"
17+
- name: "maintainer"
18+
value: "Red Hat OpenJDK <[email protected]>"
19+
- name: "com.redhat.component"
20+
value: "openjdk-17-runtime-ubi8-container"
21+
- name: "usage"
22+
value: "https://access.redhat.com/documentation/en-us/red_hat_jboss_middleware_for_openshift/3/html/red_hat_java_s2i_for_openshift/"
23+
- name: "com.redhat.license_terms"
24+
value: "https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI"
25+
26+
envs:
27+
- name: "JBOSS_IMAGE_NAME"
28+
value: *name
29+
- name: "JBOSS_IMAGE_VERSION"
30+
value: *version
31+
32+
ports:
33+
- value: 8080
34+
- value: 8443
35+
36+
modules:
37+
repositories:
38+
- path: modules
39+
install:
40+
- name: jboss.container.util.pkg-update
41+
- name: jboss.container.openjdk.jre
42+
version: "17"
43+
- name: jboss.container.java.jre.run
44+
45+
help:
46+
add: true
47+
48+
packages:
49+
manager: microdnf

0 commit comments

Comments
 (0)