FROM eclipse-temurin:25-jre@sha256:15090d159279e5c158473eccb48cd87f57b3e3a47511a797eb5a7a7ea6f86b0f

RUN apt-get update && apt-get install -y --no-install-recommends netcat-openbsd curl && rm -rf /var/lib/apt/lists/*

WORKDIR /app

ARG API_PORT=9000
EXPOSE ${API_PORT}

COPY startup.sh ./
COPY target/netneutrality.jar ./

RUN ["chmod", "+x", "./startup.sh"]
CMD ["./startup.sh"]