# syntax=docker/dockerfile:1
FROM eclipse-temurin:21-jre

RUN groupadd -g 1001 app && \
    useradd -u 1001 -g app -s /usr/sbin/nologin -M app

WORKDIR /app
COPY target/*.jar app.jar
RUN chown app:app app.jar

USER app

EXPOSE 8080
ENTRYPOINT ["sh", "-c", "exec java $JAVA_OPTS -jar app.jar"]
