-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(deps): move to jvm build (#303)
Signed-off-by: Ruben Romero Montes <rromerom@redhat.com>
- Loading branch information
Showing
18 changed files
with
114 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
#### | ||
# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode | ||
# | ||
# Build the image with: | ||
# | ||
# docker build -f src/main/docker/Dockerfile.jvm.staged -t quarkus/code-with-quarkus-jvm . | ||
# | ||
# Then run the container using: | ||
# | ||
# docker run -i --rm -p 8081:8081 quarkus/code-with-quarkus-jvm | ||
# | ||
# If you want to include the debug port into your docker image | ||
# you will have to expose the debug port (default 5005) like this : EXPOSE 8080 5050 | ||
# | ||
# Then run the container using : | ||
# | ||
# docker run -i --rm -p 8080:8080 -p 9000:9000 -p 5005:5005 -e JAVA_ENABLE_DEBUG="true" quarkus/code-with-quarkus-jvm | ||
# | ||
### | ||
FROM registry.redhat.io/ubi9/openjdk-21:1.18 | ||
|
||
USER root | ||
WORKDIR /build | ||
|
||
## Maven Settings with the auth token for Github Maven Repository | ||
COPY settings.xml settings.xml | ||
COPY pom.xml . | ||
COPY ui ui | ||
|
||
RUN mvn -B --settings settings.xml org.apache.maven.plugins:maven-dependency-plugin:3.6.1:go-offline | ||
|
||
COPY src src | ||
|
||
RUN mvn verify -B | ||
|
||
RUN grep version /build/target/maven-archiver/pom.properties | cut -d '=' -f2 >.env-version | ||
RUN grep artifactId /build/target/maven-archiver/pom.properties | cut -d '=' -f2 >.env-id | ||
|
||
# if this is an uber jar create a structure that looks the same as fast-jar with empty directories | ||
# this allows for the same dockerfile to be used with both | ||
RUN if [ ! -d /build/target/quarkus-app ] ; then mkdir -p /build/target/quarkus-app/lib; \ | ||
mkdir -p /build/target/quarkus-app/app; \ | ||
mkdir -p /build/target/quarkus-app/quarkus; \ | ||
mv /build/target/$(cat .env-id)-$(cat .env-version)*.jar /build/target/quarkus-app/ ; \ | ||
fi | ||
|
||
FROM registry.redhat.io/ubi9/openjdk-21-runtime:1.18 | ||
# Configure the JAVA_OPTS, you can add -XshowSettings:vm to also display the heap size. | ||
ENV JAVA_OPTS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" | ||
# We make four distinct layers so if there are application changes the library layers can be re-used | ||
COPY --from=0 --chown=1001 /build/target/quarkus-app/lib/ /deployments/lib/ | ||
COPY --from=0 --chown=1001 /build/target/quarkus-app/*.jar /deployments/export-run-artifact.jar | ||
COPY --from=0 --chown=1001 /build/target/quarkus-app/app/ /deployments/app/ | ||
COPY --from=0 --chown=1001 /build/target/quarkus-app/quarkus/ /deployments/quarkus/ | ||
|
||
EXPOSE 8080 | ||
EXPOSE 9000 | ||
|
||
ENTRYPOINT ["/opt/jboss/container/java/run/run-java.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.