feat: Enhance Dockerfile security with non-root users and correct file permissions, and adjust Gitea workflow action versions.
All checks were successful
Build and Push Docker Images / build-and-push-backend (push) Successful in 17s
Build and Push Docker Images / build-and-push-frontend (push) Successful in 10s
Build and Push Docker Images / deploy-to-k8s (push) Successful in 1m25s

This commit is contained in:
Zuev
2026-03-17 02:47:57 +03:00
parent d69eab1c12
commit 04feb5a3c3
3 changed files with 16 additions and 8 deletions

View File

@@ -6,6 +6,11 @@ COPY src ./src
RUN mvn package -DskipTests -B
FROM eclipse-temurin:17-jre-alpine
# Best practice: run as a non-root user
RUN addgroup -S spring && adduser -S spring -G spring
USER spring:spring
WORKDIR /app
COPY --from=build /app/target/app.jar app.jar
EXPOSE 8080