1
1
mirror of https://github.com/theoludwig/programming-challenges.git synced 2024-12-08 00:45:29 +01:00
programming-challenges/templates/docker/java/Dockerfile

11 lines
299 B
Docker

FROM openjdk:21 AS builder
WORKDIR /usr/src/application
COPY ./ ./
RUN javac Solution.java
RUN jar cfe solution.jar Solution *.class
FROM gcr.io/distroless/java21-debian12:latest AS runner
WORKDIR /usr/src/application
COPY --from=builder /usr/src/application/solution.jar ./
CMD ["./solution.jar"]