Skip to content

Commit 9b03cc8

Browse files
committed
Changes to add CMD for runtime images
Signed-off-by: Jayashree Huttanagoudar <[email protected]>
1 parent c522344 commit 9b03cc8

File tree

5 files changed

+47
-0
lines changed

5 files changed

+47
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
# Start JVM
4+
startup() {
5+
echo "This is the Red Hat UBI8 OpenJDK ${JAVA_VERSION} Runtime container."
6+
}
7+
8+
# =============================================================================
9+
# Fire up
10+
startup $*

modules/jre/run/configure.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/sh
2+
# Configure module
3+
set -e
4+
5+
SCRIPT_DIR=$(dirname $0)
6+
ARTIFACTS_DIR=${SCRIPT_DIR}/artifacts
7+
8+
chown -R jboss:root $SCRIPT_DIR
9+
chmod -R ug+rwX $SCRIPT_DIR
10+
chmod ug+x ${ARTIFACTS_DIR}/opt/jboss/container/java/*
11+
12+
pushd ${ARTIFACTS_DIR}
13+
cp -pr * /
14+
popd
15+
16+
mkdir -p /deployments/data \
17+
&& chmod -R "ug+rwX" /deployments/data \
18+
&& chown -R jboss:root /deployments/data

modules/jre/run/module.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
schema_version: 1
2+
name: jboss.container.java.jre.run
3+
version: '1.0'
4+
description: ^
5+
Provides support for running Java applications. Basic usage is
6+
$JBOSS_CONTAINER_JAVA_RUN_MODULE/run-java.sh.
7+
8+
envs:
9+
- name: JBOSS_CONTAINER_JAVA_RUN_MODULE
10+
value: /opt/jboss/container/java/run
11+
12+
execute:
13+
- script: configure.sh
14+
15+
run:
16+
cmd:
17+
- "/opt/jboss/container/java/run"

ubi8-openjdk-11-runtime.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ modules:
3939
install:
4040
- name: jboss.container.openjdk.jre
4141
version: "11"
42+
- name: jboss.container.java.jre.run
4243

4344
help:
4445
add: true

ubi8-openjdk-8-runtime.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ modules:
3939
install:
4040
- name: jboss.container.openjdk.jre
4141
version: "8"
42+
- name: jboss.container.java.jre.run
4243

4344
help:
4445
add: true

0 commit comments

Comments
 (0)