We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5522638 commit 3615fbbCopy full SHA for 3615fbb
Dockerfile
@@ -0,0 +1,19 @@
1
+FROM gradle:jdk22 as build
2
+
3
+LABEL authors="hendisantika"
4
+# Copy the Gradle project into the image
5
+COPY --chown=gradle:gradle . /home/gradle/src
6
+WORKDIR /home/gradle/src
7
8
+# Build the application without running tests
9
+RUN gradle build --no-daemon -x test || ./gradlew build --no-daemon -x test
10
11
+# Use Amazon Corretto image for the runtime
12
+FROM amazoncorretto:22
13
14
+# Copy the built JAR from the build stage
15
+WORKDIR /app
16
+COPY --from=build /home/gradle/src/build/libs/*.jar app.jar
17
18
+# Run the application
19
+CMD ["java", "-jar", "app.jar"]
0 commit comments