Skip to content

Commit

Permalink
3.x: Get JDK and linux images from container-registry.oracle.com (hel…
Browse files Browse the repository at this point in the history
…idon-io#8741)

* Get JDK and linux images from container-registry.oracle.com
  • Loading branch information
barchetta authored May 10, 2024
1 parent 90d9391 commit b805a51
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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"]
Expand Down
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions lra/coordinator/server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2021, 2023 Oracle and/or its affiliates.
# Copyright (c) 2021, 2024 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.
Expand All @@ -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

Expand All @@ -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 ./
Expand Down

0 comments on commit b805a51

Please sign in to comment.