FROM eclipse-temurin:25-jre@sha256:93a78f5866e0a4b100e6d3088f32db0ddf27970c02cd900694ee9b4abd771a15

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