Skip to content

Commit 03825a5

Browse files
authored
still trying
1 parent 9e07dd5 commit 03825a5

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

backend-java/Dockerfile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,28 @@
11

22

33
# "Provides the native-image executable. Used by the Maven and Gradle plugin from Quarkus to build linux64 executables"
4-
FROM maven:3.9-eclipse-temurin AS build
4+
FROM maven:3.9-eclipse-temurin-24 AS build
55
WORKDIR /app
66
# Image defaults to /project; copy controlled by .dockerignore
77
COPY --chown=quarkus:quarkus . ./
88
RUN ./mvnw package -DskipTests
99

1010

11-
FROM registry.access.redhat.com/ubi9/openjdk-21:1.21 as deploy
11+
FROM eclipse-temurin:24-jdk as deploy
1212

1313
ENV LANGUAGE='en_US:en'
1414

15+
RUN mkdir /deployments
16+
1517

1618
# We make four distinct layers so if there are application changes the library layers can be re-used
1719
COPY --chown=185 --from=build /app/target/quarkus-app/lib/ /deployments/lib/
18-
COPY --chown=185 --from=build /app/target/quarkus-app/*.jar /deployments/
20+
COPY --chown=185 --from=build /app/target/quarkus-app/*.jar /deployments/app.jar
1921
COPY --chown=185 --from=build /app/target/quarkus-app/app/ /deployments/app/
2022
COPY --chown=185 --from=build /app/target/quarkus-app/quarkus/ /deployments/quarkus/
2123

2224
EXPOSE 3000
2325
HEALTHCHECK --interval=300s --timeout=3s CMD curl -f http://localhost:3000/ || exit 1
2426
USER 185
2527
ENV JAVA_OPTS_APPEND="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
26-
ENV JAVA_APP_JAR="/deployments/quarkus-run.jar"
27-
28+
CMD ["java", "-jar", "/deployments/app.jar"]

0 commit comments

Comments
 (0)