FROM eclipse-temurin:25-jre@sha256:5ff847fd719aad712d5848d3d78b6ffe854f9051ca44d869f4bd9e03e851d83a

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"]