FROM eclipse-temurin:17
RUN addgroup citygmlstore && \
adduser --no-create-home --system --ingroup citygmlstore citygmlstore

# Set working directory
WORKDIR /citygmlstore

ARG JAR_FILE=*.jar
COPY ${JAR_FILE} citygmlstore-backend.jar
# Set ownership
RUN chown -R citygmlstore:citygmlstore /citygmlstore

USER citygmlstore:citygmlstore

ENTRYPOINT ["java", "-jar","/citygmlstore/citygmlstore-backend.jar"]