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
2022-12-30 00:55:21 +01:00

11 lines
299 B
Docker

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