14 lines
394 B
Docker
14 lines
394 B
Docker
FROM clojure:openjdk-16-alpine AS builder
|
|
RUN mkdir -p /app
|
|
WORKDIR /app
|
|
COPY project.clj /app
|
|
RUN lein deps
|
|
COPY . /app
|
|
RUN mv "$(lein uberjar | sed -n 's/^Created \(.*standalone\.jar\)/\1/p')" app-standalone.jar
|
|
|
|
FROM openjdk:16
|
|
RUN mkdir -p /app/public
|
|
WORKDIR /app
|
|
COPY --from=builder /app/app-standalone.jar /app/bdm.jar
|
|
# Make sure you mount the public folder
|
|
CMD java -jar bdm.jar $TYPE
|