diff --git a/archetypes/helidon/src/main/archetype/common/docker.xml b/archetypes/helidon/src/main/archetype/common/docker.xml index a09bbe76cc6..5ed2e9376c8 100644 --- a/archetypes/helidon/src/main/archetype/common/docker.xml +++ b/archetypes/helidon/src/main/archetype/common/docker.xml @@ -62,11 +62,11 @@ - - pom.xml + + ADD pom.xml . - src + ADD src src diff --git a/archetypes/helidon/src/main/archetype/common/files/Dockerfile.jlink.mustache b/archetypes/helidon/src/main/archetype/common/files/Dockerfile.jlink.mustache index df76d3b74d7..2b7f84508e6 100644 --- a/archetypes/helidon/src/main/archetype/common/files/Dockerfile.jlink.mustache +++ b/archetypes/helidon/src/main/archetype/common/files/Dockerfile.jlink.mustache @@ -1,6 +1,16 @@ # 1st stage, build the app -FROM maven:3.8.4-openjdk-17-slim as build +FROM container-registry.oracle.com/java/openjdk:21 as build + +WORKDIR /usr/share + +# Install maven +RUN set -x && \ + curl -O https://archive.apache.org/dist/maven/maven-3/3.8.4/binaries/apache-maven-3.8.4-bin.tar.gz && \ + tar -xvf apache-maven-*-bin.tar.gz && \ + rm apache-maven-*-bin.tar.gz && \ + mv apache-maven-* maven && \ + ln -s /usr/share/maven/bin/mvn /bin/ WORKDIR /helidon diff --git a/archetypes/helidon/src/main/archetype/common/files/Dockerfile.mustache b/archetypes/helidon/src/main/archetype/common/files/Dockerfile.mustache index 73d1f165531..883d9dfade3 100644 --- a/archetypes/helidon/src/main/archetype/common/files/Dockerfile.mustache +++ b/archetypes/helidon/src/main/archetype/common/files/Dockerfile.mustache @@ -17,14 +17,14 @@ WORKDIR /helidon # Incremental docker builds will always resume after that, unless you update # the pom {{#poms}} -ADD {{.}} {{.}} +{{.}} {{/poms}} RUN mvn package -Dmaven.test.skip -Declipselink.weave.skip {{#docker-phase1-options}}{{.}}{{^last}} {{/last}}{{/docker-phase1-options}} # Do the Maven build! # Incremental docker builds will resume here when you change sources {{#src-dirs}} -ADD {{.}} {{.}} +{{.}} {{/src-dirs}} RUN mvn package -DskipTests diff --git a/archetypes/helidon/src/main/archetype/common/files/pom.xml.mustache b/archetypes/helidon/src/main/archetype/common/files/pom.xml.mustache index cba530bef03..d690036acf7 100644 --- a/archetypes/helidon/src/main/archetype/common/files/pom.xml.mustache +++ b/archetypes/helidon/src/main/archetype/common/files/pom.xml.mustache @@ -15,11 +15,11 @@ {{artifactId}} {{project-version}} - {{#mainClass}} + {{mainClass}} -{{/mainClass}} +{{/mainClass}} {{#dependencies}} diff --git a/archetypes/helidon/src/main/archetype/mp/oci/oci-mp.xml b/archetypes/helidon/src/main/archetype/mp/oci/oci-mp.xml index 31ce157a214..afdb6cf6d77 100644 --- a/archetypes/helidon/src/main/archetype/mp/oci/oci-mp.xml +++ b/archetypes/helidon/src/main/archetype/mp/oci/oci-mp.xml @@ -397,13 +397,14 @@ Mount this volume as part of your application containers specification ]]> - client/pom.xml - server/pom.xml + ADD pom.xml pom.xml + ADD client/pom.xml client/pom.xml + ADD server/pom.xml server/pom.xml - client/src - server/src - spec/api.yaml + ADD client/src client/src + ADD server/src server/src + ADD spec/api.yaml spec/api.yaml diff --git a/docs/mp/guides/mp-tutorial.adoc b/docs/mp/guides/mp-tutorial.adoc index 6fb22815d07..3e5fa20b056 100644 --- a/docs/mp/guides/mp-tutorial.adoc +++ b/docs/mp/guides/mp-tutorial.adoc @@ -948,7 +948,17 @@ Add a new `Dockerfile` in the project root directory with the following content: [source,bash] .Dockerfile content ---- -FROM maven:3.8.4-openjdk-17-slim as build <1> +FROM container-registry.oracle.com/java/openjdk:21 as build <1> + +# Install maven +WORKDIR /usr/share +RUN set -x && \ + curl -O https://archive.apache.org/dist/maven/maven-3/3.8.4/binaries/apache-maven-3.8.4-bin.tar.gz && \ + tar -xvf apache-maven-*-bin.tar.gz && \ + rm apache-maven-*-bin.tar.gz && \ + mv apache-maven-* maven && \ + ln -s /usr/share/maven/bin/mvn /bin/ + WORKDIR /helidon ADD pom.xml . @@ -958,13 +968,13 @@ ADD src src RUN mvn package -DskipTests <3> RUN echo "done!" -FROM openjdk:17-jdk-slim <4> +FROM container-registry.oracle.com/java/openjdk:21 WORKDIR /helidon -COPY --from=build /helidon/target/helidon-mp-tutorial.jar ./ <5> +COPY --from=build /helidon/target/helidon-mp-tutorial.jar ./ <4> COPY --from=build /helidon/target/libs ./libs -CMD ["java", "-jar", "helidon-mp-tutorial.jar"] <6> +CMD ["java", "-jar", "helidon-mp-tutorial.jar"] <5> EXPOSE 8080 ---- @@ -977,9 +987,8 @@ EXPOSE 8080 builds faster because they will use this cached layer rather than downloading everything again. <3> Add the source code and do the real build. -<4> Start a second stage using a much smaller runtime image. -<5> Copy the binary and libraries from the first stage. -<6> Set the initial command and expose port 8080. +<4> Copy the binary and libraries from the first stage. +<5> Set the initial command and expose port 8080. To create the Docker image, use the following command: diff --git a/examples/employee-app/Dockerfile b/examples/employee-app/Dockerfile index 29b4c387002..17710481a7c 100644 --- a/examples/employee-app/Dockerfile +++ b/examples/employee-app/Dockerfile @@ -1,5 +1,5 @@ # -# Copyright (c) 2019, 2021 Oracle and/or its affiliates. +# Copyright (c) 2019, 2023 Oracle and/or its affiliates. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,7 +15,16 @@ # # 1st stage, build the app -FROM maven:3.6.3-openjdk-17-slim as build +FROM container-registry.oracle.com/java/openjdk:21 as build + +# Install maven +WORKDIR /usr/share +RUN set -x && \ + curl -O https://archive.apache.org/dist/maven/maven-3/3.8.4/binaries/apache-maven-3.8.4-bin.tar.gz && \ + tar -xvf apache-maven-*-bin.tar.gz && \ + rm apache-maven-*-bin.tar.gz && \ + mv apache-maven-* maven && \ + ln -s /usr/share/maven/bin/mvn /bin/ WORKDIR /helidon @@ -33,7 +42,7 @@ RUN mvn package -DskipTests RUN echo "done!" # 2nd stage, build the runtime image -FROM openjdk:17-jdk-slim +FROM container-registry.oracle.com/java/openjdk:21 WORKDIR /helidon # Copy the binary built in the 1st stage diff --git a/examples/integrations/cdi/datasource-hikaricp/Dockerfile b/examples/integrations/cdi/datasource-hikaricp/Dockerfile index 13dcb075d73..de49c098f2a 100644 --- a/examples/integrations/cdi/datasource-hikaricp/Dockerfile +++ b/examples/integrations/cdi/datasource-hikaricp/Dockerfile @@ -1,5 +1,5 @@ # -# Copyright (c) 2018, 2021 Oracle and/or its affiliates. +# Copyright (c) 2018, 2023 Oracle and/or its affiliates. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,7 +15,16 @@ # # 1st stage, build the app -FROM maven:3.6.3-openjdk-17-slim as build +FROM container-registry.oracle.com/java/openjdk:21 as build + +# Install maven +WORKDIR /usr/share +RUN set -x && \ + curl -O https://archive.apache.org/dist/maven/maven-3/3.8.4/binaries/apache-maven-3.8.4-bin.tar.gz && \ + tar -xvf apache-maven-*-bin.tar.gz && \ + rm apache-maven-*-bin.tar.gz && \ + mv apache-maven-* maven && \ + ln -s /usr/share/maven/bin/mvn /bin/ WORKDIR /helidon @@ -32,7 +41,7 @@ RUN mvn package -DskipTests RUN echo "done!" # 2nd stage, build the runtime image -FROM openjdk:17-jdk-slim +FROM container-registry.oracle.com/java/openjdk:21 WORKDIR /helidon # Copy the binary built in the 1st stage diff --git a/examples/quickstarts/helidon-quickstart-mp/Dockerfile b/examples/quickstarts/helidon-quickstart-mp/Dockerfile index e7a36c50829..d2466ddbac5 100644 --- a/examples/quickstarts/helidon-quickstart-mp/Dockerfile +++ b/examples/quickstarts/helidon-quickstart-mp/Dockerfile @@ -1,5 +1,5 @@ # -# Copyright (c) 2018, 2022 Oracle and/or its affiliates. +# Copyright (c) 2018, 2023 Oracle and/or its affiliates. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,7 +15,16 @@ # # 1st stage, build the app -FROM maven:3.8.4-openjdk-17-slim as build +FROM container-registry.oracle.com/java/openjdk:21 as build + +# Install maven +WORKDIR /usr/share +RUN set -x && \ + curl -O https://archive.apache.org/dist/maven/maven-3/3.8.4/binaries/apache-maven-3.8.4-bin.tar.gz && \ + tar -xvf apache-maven-*-bin.tar.gz && \ + rm apache-maven-*-bin.tar.gz && \ + mv apache-maven-* maven && \ + ln -s /usr/share/maven/bin/mvn /bin/ WORKDIR /helidon @@ -32,7 +41,7 @@ RUN mvn package -DskipTests RUN echo "done!" # 2nd stage, build the runtime image -FROM openjdk:17-jdk-slim +FROM container-registry.oracle.com/java/openjdk:21 WORKDIR /helidon # Copy the binary built in the 1st stage diff --git a/examples/quickstarts/helidon-quickstart-mp/Dockerfile.jlink b/examples/quickstarts/helidon-quickstart-mp/Dockerfile.jlink index 1f0bc842fdc..cc482519f6d 100644 --- a/examples/quickstarts/helidon-quickstart-mp/Dockerfile.jlink +++ b/examples/quickstarts/helidon-quickstart-mp/Dockerfile.jlink @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2022 Oracle and/or its affiliates. +# Copyright (c) 2020, 2023 Oracle and/or its affiliates. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,7 +15,16 @@ # # 1st stage, build the app -FROM maven:3.8.4-openjdk-17-slim as build +FROM container-registry.oracle.com/java/openjdk:21 as build + +# Install maven +WORKDIR /usr/share +RUN set -x && \ + curl -O https://archive.apache.org/dist/maven/maven-3/3.8.4/binaries/apache-maven-3.8.4-bin.tar.gz && \ + tar -xvf apache-maven-*-bin.tar.gz && \ + rm apache-maven-*-bin.tar.gz && \ + mv apache-maven-* maven && \ + ln -s /usr/share/maven/bin/mvn /bin/ WORKDIR /helidon diff --git a/examples/quickstarts/helidon-quickstart-se/Dockerfile.jlink b/examples/quickstarts/helidon-quickstart-se/Dockerfile.jlink index 7906e826c2f..245e889702c 100644 --- a/examples/quickstarts/helidon-quickstart-se/Dockerfile.jlink +++ b/examples/quickstarts/helidon-quickstart-se/Dockerfile.jlink @@ -15,7 +15,7 @@ # # 1st stage, build the app -FROM container-registry.oracle.com/java/openjdk:21 as maven +FROM container-registry.oracle.com/java/openjdk:21 as build # Install maven WORKDIR /usr/share diff --git a/examples/quickstarts/helidon-standalone-quickstart-mp/Dockerfile b/examples/quickstarts/helidon-standalone-quickstart-mp/Dockerfile index b3ca729710f..0e6c1e2c6b6 100644 --- a/examples/quickstarts/helidon-standalone-quickstart-mp/Dockerfile +++ b/examples/quickstarts/helidon-standalone-quickstart-mp/Dockerfile @@ -1,5 +1,5 @@ # -# Copyright (c) 2018, 2022 Oracle and/or its affiliates. +# Copyright (c) 2018, 2023 Oracle and/or its affiliates. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,7 +15,16 @@ # # 1st stage, build the app -FROM maven:3.8.4-openjdk-17-slim as build +FROM container-registry.oracle.com/java/openjdk:21 as build + +# Install maven +WORKDIR /usr/share +RUN set -x && \ + curl -O https://archive.apache.org/dist/maven/maven-3/3.8.4/binaries/apache-maven-3.8.4-bin.tar.gz && \ + tar -xvf apache-maven-*-bin.tar.gz && \ + rm apache-maven-*-bin.tar.gz && \ + mv apache-maven-* maven && \ + ln -s /usr/share/maven/bin/mvn /bin/ WORKDIR /helidon @@ -32,7 +41,7 @@ RUN mvn package -DskipTests RUN echo "done!" # 2nd stage, build the runtime image -FROM openjdk:17-jdk-slim +FROM container-registry.oracle.com/java/openjdk:21 WORKDIR /helidon # Copy the binary built in the 1st stage diff --git a/examples/quickstarts/helidon-standalone-quickstart-mp/Dockerfile.jlink b/examples/quickstarts/helidon-standalone-quickstart-mp/Dockerfile.jlink index 1f0bc842fdc..c76160bcae3 100644 --- a/examples/quickstarts/helidon-standalone-quickstart-mp/Dockerfile.jlink +++ b/examples/quickstarts/helidon-standalone-quickstart-mp/Dockerfile.jlink @@ -1,5 +1,5 @@ # -# Copyright (c) 2020, 2022 Oracle and/or its affiliates. +# Copyright (c) 2020, 2023 Oracle and/or its affiliates. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,7 +15,16 @@ # # 1st stage, build the app -FROM maven:3.8.4-openjdk-17-slim as build +FROM container-registry.oracle.com/java/openjdk:21 as build + +# Install maven +WORKDIR /usr/share +RUN set -x && \ + curl -O https://archive.apache.org/dist/maven/maven-3/3.8.4/binaries/apache-maven-3.8.4-bin.tar.gz && \ + tar -xvf apache-maven-*-bin.tar.gz && \ + rm apache-maven-*-bin.tar.gz && \ + mv apache-maven-* maven && \ + ln -s /usr/share/maven/bin/mvn /bin/ WORKDIR /helidon @@ -35,6 +44,6 @@ RUN echo "done!" FROM debian:stretch-slim WORKDIR /helidon -COPY --from=build /helidon/target/helidon-quickstart-mp-jri ./ +COPY --from=build /helidon/target/helidon-standalone-quickstart-mp-jri ./ ENTRYPOINT ["/bin/bash", "/helidon/bin/start"] EXPOSE 8080 diff --git a/examples/quickstarts/helidon-standalone-quickstart-mp/README.md b/examples/quickstarts/helidon-standalone-quickstart-mp/README.md index f0d0ad8e4e7..2dcb0bdba60 100644 --- a/examples/quickstarts/helidon-standalone-quickstart-mp/README.md +++ b/examples/quickstarts/helidon-standalone-quickstart-mp/README.md @@ -106,13 +106,13 @@ Start the application: Build the "native" Docker Image ``` -docker build -t helidon-quickstart-mp-native -f Dockerfile.native . +docker build -t helidon-standalone-quickstart-mp-native -f Dockerfile.native . ``` Start the application: ``` -docker run --rm -p 8080:8080 helidon-quickstart-mp-native:latest +docker run --rm -p 8080:8080 helidon-standalone-quickstart-mp-native:latest ``` ## Build a Java Runtime Image using jlink @@ -141,7 +141,7 @@ See https://github.com/oracle/helidon-build-tools/tree/master/helidon-maven-plug Start the application: ``` -./target/helidon-quickstart-se-jri/bin/start +./target/helidon-standalone-quickstart-mp-jri/bin/start ``` ### Multi-stage Docker build @@ -149,17 +149,17 @@ Start the application: Build the JRI as a Docker Image ``` -docker build -t helidon-quickstart-mp-jri -f Dockerfile.jlink . +docker build -t helidon-standalone-quickstart-mp-jri -f Dockerfile.jlink . ``` Start the application: ``` -docker run --rm -p 8080:8080 helidon-quickstart-mp-jri:latest +docker run --rm -p 8080:8080 helidon-standalone-quickstart-mp-jri:latest ``` See the start script help: ``` -docker run --rm helidon-quickstart-mp-jri:latest --help +docker run --rm helidon-standalone-quickstart-mp-jri:latest --help ``` diff --git a/examples/quickstarts/helidon-standalone-quickstart-se/Dockerfile b/examples/quickstarts/helidon-standalone-quickstart-se/Dockerfile index 14333cfde36..28188f2b5bc 100644 --- a/examples/quickstarts/helidon-standalone-quickstart-se/Dockerfile +++ b/examples/quickstarts/helidon-standalone-quickstart-se/Dockerfile @@ -15,7 +15,7 @@ # # 1st stage, build the app -FROM container-registry.oracle.com/java/openjdk:21 as maven +FROM container-registry.oracle.com/java/openjdk:21 as build # Install maven WORKDIR /usr/share diff --git a/examples/quickstarts/helidon-standalone-quickstart-se/Dockerfile.jlink b/examples/quickstarts/helidon-standalone-quickstart-se/Dockerfile.jlink index 7906e826c2f..8d897eff910 100644 --- a/examples/quickstarts/helidon-standalone-quickstart-se/Dockerfile.jlink +++ b/examples/quickstarts/helidon-standalone-quickstart-se/Dockerfile.jlink @@ -15,7 +15,7 @@ # # 1st stage, build the app -FROM container-registry.oracle.com/java/openjdk:21 as maven +FROM container-registry.oracle.com/java/openjdk:21 as build # Install maven WORKDIR /usr/share @@ -44,6 +44,6 @@ RUN echo "done!" FROM debian:stretch-slim WORKDIR /helidon -COPY --from=build /helidon/target/helidon-quickstart-se-jri ./ +COPY --from=build /helidon/target/helidon-standalone-quickstart-se-jri ./ ENTRYPOINT ["/bin/bash", "/helidon/bin/start"] EXPOSE 8080 diff --git a/examples/quickstarts/helidon-standalone-quickstart-se/README.md b/examples/quickstarts/helidon-standalone-quickstart-se/README.md index 73227cca7dd..f7bd161fa43 100644 --- a/examples/quickstarts/helidon-standalone-quickstart-se/README.md +++ b/examples/quickstarts/helidon-standalone-quickstart-se/README.md @@ -142,7 +142,7 @@ See https://github.com/oracle/helidon-build-tools/tree/master/helidon-maven-plug Start the application: ``` -./target/helidon-quickstart-se-jri/bin/start +./target/helidon-standalone-quickstart-se-jri/bin/start ``` ### Multi-stage Docker build @@ -150,17 +150,17 @@ Start the application: Build the JRI as a Docker Image ``` -docker build -t helidon-quickstart-se-jri -f Dockerfile.jlink . +docker build -t helidon-standalone-quickstart-se-jri -f Dockerfile.jlink . ``` Start the application: ``` -docker run --rm -p 8080:8080 helidon-quickstart-se-jri:latest +docker run --rm -p 8080:8080 helidon-standalone-quickstart-se-jri:latest ``` See the start script help: ``` -docker run --rm helidon-quickstart-se-jri:latest --help +docker run --rm helidon-standalone-quickstart-se-jri:latest --help ``` diff --git a/examples/translator-app/README.md b/examples/translator-app/README.md index 1a5f18afdbf..e3913c42bc0 100644 --- a/examples/translator-app/README.md +++ b/examples/translator-app/README.md @@ -28,7 +28,7 @@ kubectl apply \ With Docker: ```bash docker build -t helidon-examples-translator-backend backend/ -docker build -t helidon-examples--translator-frontend frontend/ +docker build -t helidon-examples-translator-frontend frontend/ docker run --rm -d -p 9080:9080 \ --link zipkin \ --name helidon-examples-translator-backend \ diff --git a/examples/translator-app/backend/Dockerfile b/examples/translator-app/backend/Dockerfile index fd93dab3215..41e657aed92 100644 --- a/examples/translator-app/backend/Dockerfile +++ b/examples/translator-app/backend/Dockerfile @@ -1,5 +1,5 @@ # -# Copyright (c) 2018, 2021 Oracle and/or its affiliates. +# Copyright (c) 2018, 2023 Oracle and/or its affiliates. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,7 +15,16 @@ # # 1st stage, build the app -FROM maven:3.6.3-openjdk-17-slim as build +FROM container-registry.oracle.com/java/openjdk:21 as build + +# Install maven +WORKDIR /usr/share +RUN set -x && \ + curl -O https://archive.apache.org/dist/maven/maven-3/3.8.4/binaries/apache-maven-3.8.4-bin.tar.gz && \ + tar -xvf apache-maven-*-bin.tar.gz && \ + rm apache-maven-*-bin.tar.gz && \ + mv apache-maven-* maven && \ + ln -s /usr/share/maven/bin/mvn /bin/ WORKDIR /helidon @@ -33,7 +42,7 @@ RUN mvn package -DskipTests RUN echo "done!" # 2nd stage, build the runtime image -FROM openjdk:17-jdk-slim +FROM container-registry.oracle.com/java/openjdk:21 WORKDIR /helidon # Copy the binary built in the 1st stage diff --git a/examples/translator-app/backend/pom.xml b/examples/translator-app/backend/pom.xml index 53514032af4..e7c937d9bcc 100644 --- a/examples/translator-app/backend/pom.xml +++ b/examples/translator-app/backend/pom.xml @@ -29,7 +29,6 @@ io.helidon.examples.translator helidon-examples-translator-backend - 4.0.0-SNAPSHOT Helidon Examples Translator Backend diff --git a/examples/translator-app/frontend/Dockerfile b/examples/translator-app/frontend/Dockerfile index c539e9f9469..9d233504060 100644 --- a/examples/translator-app/frontend/Dockerfile +++ b/examples/translator-app/frontend/Dockerfile @@ -1,5 +1,5 @@ # -# Copyright (c) 2018, 2021 Oracle and/or its affiliates. +# Copyright (c) 2018, 2023 Oracle and/or its affiliates. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,7 +15,16 @@ # # 1st stage, build the app -FROM maven:3.6.3-openjdk-17-slim as build +FROM container-registry.oracle.com/java/openjdk:21 as build + +# Install maven +WORKDIR /usr/share +RUN set -x && \ + curl -O https://archive.apache.org/dist/maven/maven-3/3.8.4/binaries/apache-maven-3.8.4-bin.tar.gz && \ + tar -xvf apache-maven-*-bin.tar.gz && \ + rm apache-maven-*-bin.tar.gz && \ + mv apache-maven-* maven && \ + ln -s /usr/share/maven/bin/mvn /bin/ WORKDIR /helidon @@ -33,7 +42,7 @@ RUN mvn package -Dmaven.test.skip RUN echo "done!" # 2nd stage, build the runtime image -FROM openjdk:17-jdk-slim +FROM container-registry.oracle.com/java/openjdk:21 WORKDIR /helidon # Copy the binary built in the 1st stage diff --git a/examples/translator-app/frontend/pom.xml b/examples/translator-app/frontend/pom.xml index c1c4c739574..8c632c1809d 100644 --- a/examples/translator-app/frontend/pom.xml +++ b/examples/translator-app/frontend/pom.xml @@ -29,7 +29,6 @@ io.helidon.examples.translator helidon-examples-translator-frontend - 4.0.0-SNAPSHOT Helidon Examples Translator Frontend diff --git a/examples/webserver/opentracing/Dockerfile b/examples/webserver/opentracing/Dockerfile index dccd442f15b..47a15766dc9 100644 --- a/examples/webserver/opentracing/Dockerfile +++ b/examples/webserver/opentracing/Dockerfile @@ -1,5 +1,5 @@ # -# Copyright (c) 2018, 2021 Oracle and/or its affiliates. +# Copyright (c) 2018, 2023 Oracle and/or its affiliates. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,7 +15,16 @@ # # 1st stage, build the app -FROM maven:3.6.3-openjdk-17-slim as build +FROM container-registry.oracle.com/java/openjdk:21 as build + +# Install maven +WORKDIR /usr/share +RUN set -x && \ + curl -O https://archive.apache.org/dist/maven/maven-3/3.8.4/binaries/apache-maven-3.8.4-bin.tar.gz && \ + tar -xvf apache-maven-*-bin.tar.gz && \ + rm apache-maven-*-bin.tar.gz && \ + mv apache-maven-* maven && \ + ln -s /usr/share/maven/bin/mvn /bin/ WORKDIR /helidon @@ -33,7 +42,7 @@ RUN mvn package -DskipTests RUN echo "done!" # 2nd stage, build the runtime image -FROM openjdk:17-jdk-slim +FROM container-registry.oracle.com/java/openjdk:21 WORKDIR /helidon # Copy the binary built in the 1st stage