Skip to content

Commit

Permalink
Merge branch 'main' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
SubbuTechTutorials authored Oct 23, 2024
2 parents 910dd65 + a415091 commit 2d601cf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
14 changes: 11 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
# Use a Maven image with JDK 17 for the build stage
FROM maven:3.9.4-eclipse-temurin-17-alpine AS build

WORKDIR /app
COPY pom.xml .

# Copy the pom.xml first and download the dependencies
COPY pom.xml ./
RUN mvn dependency:go-offline -B
COPY . .
RUN mvn clean package -DskipTests

# Copy the source code after dependencies are cached
COPY src ./src

# Package the application
RUN mvn clean package -DskipTests -Ddockerfile.skip=true

# Use JDK 17 for the runtime stage
FROM eclipse-temurin:17-jdk-alpine AS runtime

WORKDIR /app

# Copy the built JAR from the build stage
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>


<!-- JaCoCo Plugin for Code Coverage -->
<plugin>
<groupId>org.jacoco</groupId>
Expand Down

0 comments on commit 2d601cf

Please sign in to comment.