Skip to content

Commit

Permalink
ci: build inside a builder container
Browse files Browse the repository at this point in the history
  • Loading branch information
sverrehu committed Oct 10, 2023
1 parent 88b379a commit 5344510
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
FROM maven:3-eclipse-temurin-17 AS builder
WORKDIR /workspace
COPY pom.xml pom.xml
RUN mvn dependency:resolve
COPY src/ src/
RUN mvn --batch-mode verify

FROM eclipse-temurin:17.0.8_7-jre-alpine
WORKDIR /app
COPY target/k3a-lag-exporter-jar-with-dependencies.jar ./k3a-lag-exporter.jar
COPY --from=builder /workspace/target/k3a-lag-exporter-jar-with-dependencies.jar ./k3a-lag-exporter.jar

ENTRYPOINT ["java", "-Dconfig.file=k3a-lag-exporter.conf", "-jar", "k3a-lag-exporter.jar"]

0 comments on commit 5344510

Please sign in to comment.