FROM eclipse-temurin:25.0.2_10-jre@sha256:a9980cb3777d2b7b0d513800c3debc034c101530b96db4aadccb845f867fca9e

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