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 dac98bcd4e2..7abaa1bc3f0 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/jdk-no-fee-term:17 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 @@ -19,7 +29,7 @@ RUN echo "done!" # 2nd stage, build the final image with the JRI built in the 1st stage -FROM debian:stretch-slim +FROM container-registry.oracle.com/os/oraclelinux:9-slim WORKDIR /helidon COPY --from=build /helidon/target/{{artifactId}}-jri ./ ENTRYPOINT ["/bin/bash", "/helidon/bin/start"] diff --git a/archetypes/helidon/src/main/archetype/common/files/Dockerfile.mustache b/archetypes/helidon/src/main/archetype/common/files/Dockerfile.mustache index b576203be88..283644c819e 100644 --- a/archetypes/helidon/src/main/archetype/common/files/Dockerfile.mustache +++ b/archetypes/helidon/src/main/archetype/common/files/Dockerfile.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/jdk-no-fee-term:17 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 @@ -22,7 +32,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/jdk-no-fee-term:17 WORKDIR /helidon # Copy the binary built in the 1st stage diff --git a/docs-internal/examples.md b/docs-internal/examples.md new file mode 100644 index 00000000000..03033adeeeb --- /dev/null +++ b/docs-internal/examples.md @@ -0,0 +1,36 @@ +# Helidon Examples + +The Helidon examples have moved out of the main Helidon repository (`helidon`) into +the Helidon examples repository (`helidon-examples`). + +This creates a potential chicken-and-egg issue with the examples validation check that is run on PRs. +This document describes how we handle that situation. + +## Example Validation Check + +The primary Helidon repository contains a validation check for examples. This check +pulls the development branch for the corresponding major version from `helidon-examples` +(for example `dev-3.x`) and builds it to verify the PR has not broken examples. + +This check *is not required*, because there are times when a fix in the primary repository +might legitimately break an example. Therefore if this check fails it will not block +merging of the PR. + +Of course breaking examples is a red flag that you might be introducing an incompatibility. So +make sure you fully understand why the example broke and if you are introducing an incompatibility. + +## Workflow + +Let's assume you need to update the primary repository and an example because your change to the primary +repository breaks an example. You wish you could do this at the same time in one PR -- but you can't. +Here is the workflow: + +1. Create the PR against the primary repository (`helidon`) with the "breaking" change. The example validation will fail. +2. Create a PR against the example repository (`helidon-examples`) with the fix for the example. The build check might fail. +3. Add a comment to the first PR describing why the example check fails, why this isn't a compatiblity issue, and include a link to the second PR (that fixes the example). +4. Have the first PR reviewed and merge it (the example check will not block merging) +5. Re-run the build validation on the second PR. It will now pass +6. Have the second PR reviewed and merge it. + +All done! + diff --git a/lra/coordinator/server/Dockerfile b/lra/coordinator/server/Dockerfile index a496cd4a6c2..6c35a1aeac4 100644 --- a/lra/coordinator/server/Dockerfile +++ b/lra/coordinator/server/Dockerfile @@ -14,7 +14,7 @@ # limitations under the License. # -FROM container-registry.oracle.com/java/openjdk:17 as build +FROM container-registry.oracle.com/java/jdk-no-fee-term:17 as build WORKDIR /usr/share @@ -41,7 +41,7 @@ RUN wget -q -O helidon_repo.zip https://github.com/${HELIDON_REPOSITORY}/archive RUN mvn install -pl :helidon-lra-coordinator-server -am -DskipTests && \ echo "Helidon LRA Coordinator build successfully finished" -FROM container-registry.oracle.com/java/openjdk:17 +FROM container-registry.oracle.com/java/jdk-no-fee-term:17 WORKDIR /helidon COPY --from=build /helidon/lra/coordinator/server/target/helidon-lra-coordinator-server.jar ./