FROM openjdk:15-alpine

COPY ./app/build/libs/app.jar /usr/src/PresencEirb/presenceirb.jar
WORKDIR /usr/src/PresencEirb/

RUN addgroup --system presenceirb && \
    adduser --system --no-create-home --ingroup presenceirb presenceirb && \
    mkdir logs && \
    chown presenceirb:presenceirb -R .
USER presenceirb

CMD [ "java", "-jar", "presenceirb.jar" ]