Skip to content

Commit 743eb13

Browse files
MayuriXxCopilot
andauthored
Update Dockerfile
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 850d28a commit 743eb13

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ WORKDIR /app
2121
# Create a non-root user and group for running the application securely
2222
RUN groupadd --system appgroup && useradd --system --gid appgroup appuser
2323

24-
# Copy the built JAR from the build stage (explicit name to avoid matching multiple artifacts)
25-
COPY --from=build /app/target/spring_boot_java_random_user-0.0.1-SNAPSHOT.jar app.jar
24+
# Copy the built JAR from the build stage using a stable pattern so version changes do not break the image build
25+
COPY --from=build /app/target/*.jar app.jar
2626

2727
# Ensure the non-root user owns the application files
2828
RUN chown -R appuser:appgroup /app

0 commit comments

Comments
 (0)