Skip to content

Commit

Permalink
Clean up Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
samie committed May 17, 2024
1 parent 0b3f977 commit f4d6e1d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ RUN microdnf update -y && \

WORKDIR /usr/src/app

# Copy rest of the dependencies.
# Copy rest of the dependencies from pom.xml.
COPY pom.xml .
RUN mvn dependency:go-offline

# Copy the source code
COPY . .

## Do the build
# Do the build using production profile
RUN mvn clean install -Pproduction

# Second stage: Lightweight jdk-slim image
Expand All @@ -29,7 +29,7 @@ USER appuser
WORKDIR /app

# Copy the native binary from the build stage
COPY --from=build /usr/src/app/target/idle-demo-*.jar /app/app.jar
COPY --from=build /usr/src/app/target/*.jar /app/app.jar

# Run the application
EXPOSE 8080
Expand Down

0 comments on commit f4d6e1d

Please sign in to comment.