-
-
Save lukaszkorecki/ca2786d0da26e653a9c80e54752f78dc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM clojure:openjdk-11-lein-2.9.1 as builder | |
RUN mkdir -p /app | |
WORKDIR /app | |
COPY project.clj ./project.clj | |
RUN LEIN_SNAPSHOTS_IN_RELEASE=1 \ | |
lein deps | |
COPY resources ./resources | |
COPY src ./src | |
# needs the following in project.clj: :uberjar-name "app-standalone.jar" | |
RUN LEIN_SNAPSHOTS_IN_RELEASE=1 lein uberjar && \ | |
cp ./target/uberjar/app-standalone.jar ./app.jar | |
FROM openjdk:11.0.5-jre-slim-buster | |
WORKDIR /app | |
COPY --from=builder /app/app.jar . | |
CMD ["java", "-jar" , "/app/app.jar"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment