forked from mcorbin/meuse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
39 lines (27 loc) · 879 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
38
39
FROM clojure:temurin-17-lein-focal as build
ADD . /app
WORKDIR /app
RUN lein uberjar
# -----------------------------------------------------------------------------
FROM eclipse-temurin:17-focal
ARG ID
ARG TOKEN
ARG NAME
ARG EMAIL
ARG REGISTRY
RUN mkdir /app
COPY --from=build /app/target/*uberjar/meuse-*-standalone.jar /app/meuse.jar
COPY --from=build /app/dev/resources/config.yaml /app/config.yaml
RUN apt-get update && apt-get install -y git
ENV ID=$ID
ENV TOKEN=$TOKEN
ENV NAME=$NAME
ENV EMAIL=$EMAIL
ENV REGISTRY=$REGISTRY
RUN git config --global user.email $EMAIL && \
git config --global user.name "${NAME}" && \
git config --global url."https://${ID}:${TOKEN}@github.com/".insteadOf "https://github.com/"
RUN git clone $REGISTRY registry && \
git config --global --add safe.directory /registry
ENTRYPOINT ["java"]
CMD ["-jar", "/app/meuse.jar"]