forked from vitrivr/cineast
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
42 lines (32 loc) · 952 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
FROM openjdk:14-buster AS build
RUN apt-get update && \
apt-get install -y maven
COPY . /cineast-src
RUN cd /cineast-src && \
./gradlew getExternalFiles && \
./gradlew shadowJar
FROM openjdk:14-slim-buster
RUN mkdir -p /opt/cineast
COPY --from=build \
/cineast-src/cineast.json \
/opt/cineast/cineast.json
COPY --from=build \
/cineast-src/cineast-runtime/build/libs/cineast-runtime-*-all.jar \
/opt/cineast/cineast-cli.jar
COPY --from=build \
/cineast-src/cineast-api/build/libs/cineast-api-*-all.jar \
/opt/cineast/cineast-api.jar
COPY --from=build \
/cineast-src/resources \
/opt/cineast/resources
RUN printf '#!/bin/bash\n\
if [ "$1" != "api" ] && [ "$1" != "cli" ]; then\n\
echo "Usage: $0 api|cli" >&2\n\
exit 1\n\
fi\n\
cd /opt/cineast/ && java -jar cineast-$1.jar ${@:2}'\
> /opt/cineast/bootstrap.sh
RUN chmod +x /opt/cineast/bootstrap.sh
EXPOSE 4567
EXPOSE 4568
ENTRYPOINT ["/opt/cineast/bootstrap.sh"]