-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathDockerfile
55 lines (31 loc) · 988 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
ARG TZ="America/Los_Angeles"
####
## build container
FROM eclipse-temurin:11 AS build
# maven needs git
RUN apt-get update && apt-get install -y git
ADD https://dlcdn.apache.org/maven/maven-3/3.8.8/binaries/apache-maven-3.8.8-bin.tar.gz /
RUN cd /opt && tar xzf /apache-maven-3.8.8-bin.tar.gz && mv apache-maven* maven
ENV PATH="$PATH:/opt/maven/bin"
WORKDIR /opt/conciliator
COPY pom.xml .
RUN mvn dependency:go-offline -B
COPY src src
ARG skiptests=0
RUN if [ "$skiptests" -eq "1" ]; then SKIPTESTS_ARG="-Dmaven.test.skip"; fi && \
mvn package $SKIPTESTS_ARG
####
## application container
FROM eclipse-temurin:11
ARG TZ
RUN rm /etc/localtime && ln -s /usr/share/zoneinfo/$TZ /etc/localtime
ENV TZ=$TZ
WORKDIR /opt/conciliator
COPY --from=build /opt/conciliator/target/conciliator*.jar .
EXPOSE 8080 8081 8082
COPY run.sh .
COPY --chmod=755 <<EOT run_wrapper.sh
#!/usr/bin/env bash
./run.sh >> conciliator.log 2>> conciliator.log
EOT
CMD ["./run_wrapper.sh"]