Skip to content

Commit

Permalink
Add Temurin 23 Images
Browse files Browse the repository at this point in the history
  • Loading branch information
ollide committed Oct 9, 2024
1 parent 12a055d commit b8eb5b1
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/temurin-23.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Temurin 23

on:
workflow_dispatch:
schedule:
- cron: '21 21 * * *'
push:
branches:
- 'main'

jobs:
build-and-push-jre:
uses: ./.github/workflows/workflow-docker-build.yml
with:
jvm-type: jre
docker-context: temurin/23
permissions:
contents: read
packages: write

build-and-push-jdk:
uses: ./.github/workflows/workflow-docker-build.yml
with:
jvm-type: jdk
docker-context: temurin/23
permissions:
contents: read
packages: write
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ COPY --chown=formcentric:formcentric my-application.jar /formcentric/app.jar
Formcentric base images build upon the official [Adoptium](https://adoptium.net) images of the Eclipse Temurin
distribution (OpenJDK) and come in the following flavors:

### Java 23 (Until 18 Mar 2025)

- `ghcr.io/formcentric/java-base:23-jre`
- `ghcr.io/formcentric/java-base:23-jdk`

### Java 21

- `ghcr.io/formcentric/java-base:21-jre`
Expand Down
1 change: 1 addition & 0 deletions temurin/23/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
JAVA_VERSION=23_37
30 changes: 30 additions & 0 deletions temurin/23/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
ARG JVM_TYPE=jre
ARG JAVA_VERSION=23_37
ARG TEMURIN_VERSION=${JAVA_VERSION}-${JVM_TYPE}-noble
FROM eclipse-temurin:${TEMURIN_VERSION}

RUN userdel -r ubuntu

RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y --no-install-recommends \
ca-certificates \
curl \
wget \
coreutils \
fontconfig \
fonts-dejavu && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
groupadd -g 1000 formcentric && \
useradd -u 1000 -d /formcentric -g formcentric formcentric

USER formcentric:formcentric

WORKDIR /formcentric

COPY --chown=formcentric:formcentric run.sh .
RUN chmod +x run.sh

COPY --chown=formcentric:formcentric app.jar app.jar

ENTRYPOINT ["./run.sh"]
19 changes: 19 additions & 0 deletions temurin/23/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/sh
set -e

if [ -n "${EXTRA_JAVA_OPTS}" ]; then
JAVA_OPTS="$JAVA_OPTS $EXTRA_JAVA_OPTS"
fi

JAVA_CMD_ARGS="-XX:-UsePerfData \
${JAVA_OPTS} \
-XX:+UseContainerSupport \
-Djava.security.egd=file:/dev/./urandom"

if [ -f jib-classpath-file -a -f jib-main-class-file ]; then
exec java $JAVA_CMD_ARGS -cp @jib-classpath-file @jib-main-class-file ${@}
elif [ -f BOOT-INF/layers.idx ]; then
exec java $JAVA_CMD_ARGS ${SPRING_BOOT_EXPLODED_MAINCLASS:-org.springframework.boot.loader.launch.JarLauncher} ${@}
else
exec java $JAVA_CMD_ARGS -jar app.jar ${@}
fi

0 comments on commit b8eb5b1

Please sign in to comment.