-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
42 lines (27 loc) · 803 Bytes
/
Dockerfile
File metadata and controls
42 lines (27 loc) · 803 Bytes
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
FROM openjdk:8 as builder
RUN apt update && apt install -y --no-install-recommends dos2unix
WORKDIR /buildpath
COPY . .
RUN /bin/bash -c 'if [[ ! -f "callersbane.zip" ]]; then wget -O "callersbane.zip" "${callersbane_url}"; fi;'
RUN dos2unix gradlew && \
dos2unix entrypoint.sh && \
chmod +x gradlew entrypoint.sh && \
./gradlew prepareWorkspace && \
./gradlew build
FROM openjdk:8
RUN apt update && \
apt install -y mariadb-client && \
rm -rf /var/lib/apt/lists/*
WORKDIR /scrolls
COPY --from=builder /buildpath/build/libs ./
COPY --from=builder /buildpath/entrypoint.sh ./
COPY *.json ./
ARG memory=4G
ENV MEMORY=$memory
ENV NODE_ID=test-server
ENV DB_HOST="database"
ENV DB_USER=scrolls
ENV DB_PASS=scrolls
EXPOSE 8081
EXPOSE 8082
ENTRYPOINT ["./entrypoint.sh"]