Skip to content

Commit

Permalink
fix(DockerFile): Fix trivy scan
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiodmota committed Nov 14, 2023
1 parent 575e820 commit 3659e41
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,17 @@ WORKDIR /app

COPY --chown=${UID}:${GID} --from=maven target/value-added-service-*.jar app.jar

# Update libcrypto3 and add wget in one RUN command
RUN apk update && \
apk add libcrypto3=3.1.4-r0 --update-cache && \
apk --no-cache add wget


USER ${UID}:${GID}

# Health check instruction
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD wget --quiet --tries=1 --spider http://localhost:8080/actuator/health || exit 1

# set the startup command to run your binary
CMD ["java", "-jar", "./app.jar"]
Expand Down

0 comments on commit 3659e41

Please sign in to comment.