There was an error while loading. Please reload this page.
1 parent 850d28a commit 743eb13Copy full SHA for 743eb13
1 file changed
Dockerfile
@@ -21,8 +21,8 @@ WORKDIR /app
21
# Create a non-root user and group for running the application securely
22
RUN groupadd --system appgroup && useradd --system --gid appgroup appuser
23
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
+# Copy the built JAR from the build stage using a stable pattern so version changes do not break the image build
+COPY --from=build /app/target/*.jar app.jar
26
27
# Ensure the non-root user owns the application files
28
RUN chown -R appuser:appgroup /app
0 commit comments