FROM eclipse-temurin:25.0.2_10-jre@sha256:541cd02a3920c1f10b2f34af7b7144414bc48f0b5dbc933a1def87699e5e5727

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