Files
XpenselyServer/dockerfile

24 lines
405 B
Plaintext
Raw Normal View History

2026-02-04 15:13:23 +01:00
# Stage 1: Build the JAR
FROM eclipse-temurin:17-jdk AS build
2026-02-04 15:13:23 +01:00
WORKDIR /app
# Copy Maven files and source code
COPY pom.xml .
COPY src ./src
# Build the Spring Boot app
RUN ./mvnw clean package -DskipTests
# Stage 2: Runtime
FROM eclipse-temurin:17-jdk-slim
WORKDIR /app
# Copy built JAR from build stage
COPY --from=build /app/target/*.jar app.jar
EXPOSE 8080
2026-02-04 15:13:23 +01:00
ENTRYPOINT ["java","-jar","app.jar"]