Files
netneutrality/Dockerfile
T
anthorob 01bf94c60a Switch to maven-dependency-plugin and adjust build output
Replaced `maven-shade-plugin` with `maven-dependency-plugin` for dependency management, simplifying the build process and separating runtime dependencies into a dedicated `lib/` directory. Updated `Dockerfile` and GitHub Actions config to account for these changes, ensuring all dependencies are correctly packaged and deployed.
2026-10-18 02:10:38 -04:00

27 lines
655 B
Docker

FROM eclipse-temurin:25-jdk AS build
WORKDIR /build
COPY .mvn .mvn
COPY mvnw pom.xml checkstyle.xml ./
RUN chmod +x mvnw && ./mvnw -B -q dependency:go-offline
COPY src src
RUN ./mvnw -B -q package -DskipTests
FROM eclipse-temurin:25-jre@sha256:ff82c74a630c08b417502c4c18189e62074edbb28eb1f2d31b799ac138c01058
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 --from=build /build/target/lib ./lib
COPY --from=build /build/target/netneutrality.jar ./
RUN ["chmod", "+x", "./startup.sh"]
CMD ["./startup.sh"]