-
Notifications
You must be signed in to change notification settings - Fork 2.9k
feat(cloudrun): upgrade helloworld sample to java 25 #10222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,7 +15,7 @@ | |
| # [START cloudrun_helloworld_dockerfile] | ||
| # Use the official maven image to create a build artifact. | ||
| # https://hub.docker.com/_/maven | ||
| FROM maven:3-eclipse-temurin-17-alpine as builder | ||
| FROM maven:3-eclipse-temurin-25-alpine as builder | ||
|
|
||
| # Copy local code to the container image. | ||
| WORKDIR /app | ||
|
|
@@ -27,7 +27,7 @@ RUN mvn package -DskipTests | |
|
|
||
| # Use Eclipse Temurin for base image. | ||
| # https://docs.docker.com/develop/develop-images/multistage-build/#use-multi-stage-builds | ||
| FROM eclipse-temurin:17.0.16_8-jre-alpine | ||
| FROM eclipse-temurin:25.0.1_8-jre-alpine | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| # Copy the jar to the production image from the builder stage. | ||
| COPY --from=builder /app/target/helloworld-*.jar /helloworld.jar | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,7 +24,7 @@ limitations under the License. | |
| <parent> | ||
| <groupId>com.google.cloud.samples</groupId> | ||
| <artifactId>shared-configuration</artifactId> | ||
| <version>1.2.0</version> | ||
| <version>1.2.2</version> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| </parent> | ||
| <dependencyManagement> | ||
| <dependencies> | ||
|
|
@@ -41,9 +41,9 @@ limitations under the License. | |
| <properties> | ||
| <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
| <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> | ||
| <maven.compiler.target>17</maven.compiler.target> | ||
| <maven.compiler.source>17</maven.compiler.source> | ||
| <spring-boot.version>3.2.2</spring-boot.version> | ||
| <maven.compiler.target>25</maven.compiler.target> | ||
| <maven.compiler.source>25</maven.compiler.source> | ||
| <spring-boot.version>3.5.9</spring-boot.version> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| </properties> | ||
| <dependencies> | ||
| <dependency> | ||
|
|
@@ -84,14 +84,19 @@ limitations under the License. | |
| <plugin> | ||
| <groupId>com.google.cloud.tools</groupId> | ||
| <artifactId>jib-maven-plugin</artifactId> | ||
| <version>3.4.0</version> | ||
| <version>3.5.1</version> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| <configuration> | ||
| <to> | ||
| <image>gcr.io/PROJECT_ID/helloworld</image> | ||
| </to> | ||
| </configuration> | ||
| </plugin> | ||
| <!-- [END cloudrun_helloworld_jib] --> | ||
| <plugin> | ||
| <groupId>org.jacoco</groupId> | ||
| <artifactId>jacoco-maven-plugin</artifactId> | ||
| <version>0.8.14</version> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| </plugin> | ||
| </plugins> | ||
| </build> | ||
| </project> | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Docker base image
maven:3-eclipse-temurin-25-alpinedoes not appear to be publicly available on Docker Hub. This will cause the Docker build to fail. Please use a valid, existing image tag.