Skip to content
This repository was archived by the owner on Feb 15, 2023. It is now read-only.

Commit 69914f1

Browse files
authored
Merge pull request #133 from IBM/java-17
update to Java 17
2 parents 638ed01 + b953e29 commit 69914f1

File tree

4 files changed

+9
-23
lines changed

4 files changed

+9
-23
lines changed

.github/workflows/maven.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ jobs:
99

1010
steps:
1111
- uses: actions/checkout@v2
12-
- name: Set up JDK 1.8
12+
- name: Set up JDK 17
1313
uses: actions/setup-java@v1
1414
with:
15-
java-version: 1.8
15+
java-version: 17
1616
- name: Build with Maven
1717
run: mvn -B package --file pom.xml
1818
- name: Run unit test with Surefire

Dockerfile

+5-10
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
1-
# IBM Java SDK UBI is not available on public docker yet. Use regular
2-
# base as builder until this is ready. For reference:
3-
# https://github.com/ibmruntimes/ci.docker/tree/master/ibmjava/8/sdk/ubi-min
4-
5-
FROM ibmjava:8-sdk AS builder
1+
FROM registry.access.redhat.com/ubi8/openjdk-17:1.11 AS builder
62
LABEL maintainer="IBM Java Engineering at IBM Cloud"
73

4+
USER root
85
WORKDIR /app
9-
RUN apt-get update \
10-
&& apt-get install -y --no-install-recommends maven=3.6.0-1~18.04.1
11-
126
COPY pom.xml .
13-
RUN mvn -N io.takari:maven:wrapper -Dmaven=3.5.0
7+
RUN mvn -N wrapper:wrapper -Dmaven=3.8.4
148

159
COPY . /app
1610
RUN ./mvnw install
@@ -20,6 +14,7 @@ ARG bx_dev_userid=1000
2014
RUN export BX_DEV_USER=$bx_dev_user
2115
RUN export BX_DEV_USERID=$bx_dev_userid
2216
RUN if [ $bx_dev_user != "root" ]; then useradd -ms /bin/bash -u $bx_dev_userid $bx_dev_user; fi
17+
USER 1001
2318

2419
# Multi-stage build. New build stage that uses the UBI as the base image.
2520

@@ -28,7 +23,7 @@ RUN if [ $bx_dev_user != "root" ]; then useradd -ms /bin/bash -u $bx_dev_userid
2823
# Docker at the moment.
2924
# (https://github.com/ibmruntimes/ci.docker/tree/master/ibmjava/8/sfj/ubi-min)
3025

31-
FROM adoptopenjdk/openjdk8:ubi-jre
26+
FROM registry.access.redhat.com/ubi8/openjdk-17:1.11
3227

3328
# Copy over app from builder image into the runtime image.
3429
RUN mkdir /opt/app

Dockerfile-tools

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
# In the short term, we are using the OpenJDK for UBI. Long term, we will use
22
# the IBM Java Small Footprint JVM (SFJ) for UBI, but that is not in public
33
# Docker at the moment.
4-
FROM adoptopenjdk/openjdk8:ubi
4+
FROM registry.access.redhat.com/ubi8/openjdk-17:1.11
55

66
LABEL maintainer="IBM Java Engineering at IBM Cloud"
77

8-
RUN yum -y install --disableplugin=subscription-manager maven \
9-
&& yum --disableplugin=subscription-manager clean all
10-
11-
128
ARG bx_dev_user=root
139
ARG bx_dev_userid=1000
1410
RUN BX_DEV_USER=$bx_dev_user

pom.xml

+1-6
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,9 @@
1010
<properties>
1111
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1212
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
13-
<maven.compiler.source>1.8</maven.compiler.source>
14-
<maven.compiler.target>1.8</maven.compiler.target>
15-
<java.version>1.8</java.version>
13+
<java.version>17</java.version>
1614
<opentracing-spring-jaeger-web-starter.version>3.3.1</opentracing-spring-jaeger-web-starter.version>
1715
<app.name>javaspringapp</app.name>
18-
19-
<!-- Remove this once Spring boot updates to 2.17.0 or above-->
20-
<log4j2.version>2.17.0</log4j2.version>
2116
</properties>
2217

2318
<parent>

0 commit comments

Comments
 (0)