-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
37 lines (22 loc) · 932 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
FROM clojure:lein@sha256:9c193148b801e0bdc8aca9940b363d35a9d0927c3c1b3aa53aa96e477d44b134 AS builder
RUN mkdir /build
WORKDIR /build
COPY project.clj /build
COPY src /build/src
RUN lein metajar
FROM openjdk:11-jre-slim@sha256:d6eff0a017d72b59c0c865488ac39fa1dedd5ad6526a35f27b7bf7a3e3ae9f67
MAINTAINER Jim Clark <jim@atomist.com>
RUN mkdir -p /usr/src/app \
&& mkdir -p /usr/src/app/bin \
&& mkdir -p /usr/src/app/lib
WORKDIR /usr/src/app
COPY --from=builder /build/target/lib /usr/src/app/lib
COPY --from=builder /build/target/metajar/service.jar /usr/src/app/
CMD ["java","-Djava.net.preferIPv4Stack=true", "-jar", "/usr/src/app/service.jar", "-Dclojure.core.async.pool-size=20"]
ENV APP_NAME=service
EXPOSE 3000
# Set up labels to make image linking work
ARG COMMIT_SHA
ARG DOCKERFILE_PATH=Dockerfile
LABEL org.opencontainers.image.revision=$COMMIT_SHA \
org.opencontainers.image.source=$DOCKERFILE_PATH