Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,15 @@ RUN mvn compile
RUN mvn dependency:copy-dependencies -DincludeScope=compile

FROM eclipse-temurin:25-jre-alpine
EXPOSE 8080
ARG PORT=8080
EXPOSE $PORT
RUN addgroup -S appgroup && adduser -S appuser -G appgroup
WORKDIR /app/
COPY --from=build /build/target/classes/ /app/
COPY --from=build /build/target/dependency/ /app/dependencies/
COPY www/ ./www/
ENV HEALTHCHECK_PORT=$PORT
HEALTHCHECK --interval=30s --timeout=3s --retries=3 CMD sh -c 'curl -fsS "http://localhost:${HEALTHCHECK_PORT}/" || exit 1'
RUN apk --no-cache add curl
USER appuser
ENTRYPOINT ["java", "-classpath", "/app:/app/dependencies/*", "org.example.App"]
ENTRYPOINT ["java", "-classpath", "/app:/app/dependencies/*", "org.example.App"]
Loading