# Fallback only — see go-Dockerfile's header comment for the general # rule, including the Harbor base-images sourcing (also applies here). # Simplified from the real java-Dockerfile: no JFrog artifact # resolution, no Homelab-internal Maven mirror. Assumes a standard Maven # repo producing a single runnable jar under target/. Switched both # stages from their Debian defaults to the -alpine variant — smaller, # still keeps a shell (not distroless). Maven itself still reaches out # to Maven Central for plugins/dependencies during the build regardless # of base image — this only removes the Docker Hub dependency for the # base image layer, not package-registry traffic during the build. FROM harbor.infra.deployshed.com/base-images/maven:3-eclipse-temurin-${version}-alpine AS build WORKDIR /src COPY pom.xml . RUN mvn -B dependency:go-offline COPY . . RUN mvn -B package -DskipTests FROM harbor.infra.deployshed.com/base-images/eclipse-temurin:${version}-jre-alpine WORKDIR /app COPY --from=build /src/target/*.jar app.jar EXPOSE 8080 ENTRYPOINT ["java", "-jar", "app.jar"]