FROM eclipse-temurin:21-jre-alpine

WORKDIR /app

RUN addgroup -g 1000 hiveiq && \
    adduser -D -u 1000 -G hiveiq hiveiq

COPY target/*.jar app.jar

RUN chown -R hiveiq:hiveiq /app

USER hiveiq

EXPOSE 8099

ENTRYPOINT ["java", "-jar", "app.jar"]
