FROM tomcat:10-jdk21-openjdk-bookworm as build LABEL authors="thuning" WORKDIR /build COPY .mvn .mvn/ COPY pom.xml pom.xml COPY mvnw mvnw RUN ./mvnw -B dependency:go-offline COPY src src RUN ./mvnw clean package FROM tomcat:10-jdk21-openjdk-bookworm as run LABEL authors="thuning" COPY --from=build /build/target/*.war /usr/local/tomcat/webapps/ROOT.war EXPOSE 8080