-
Notifications
You must be signed in to change notification settings - Fork 25
/
Dockerfile
56 lines (37 loc) · 1.44 KB
/
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
56
### Configuration
# set --build-args SKIP_TESTS=true to use
ARG SKIP_TESTS
# --- dos2unix-env # convert line endings from Windows machines
FROM docker.io/rkimf1/dos2unix@sha256:60f78cd8bf42641afdeae3f947190f98ae293994c0443741a2b3f3034998a6ed as dos2unix-env
WORKDIR /convert
COPY gradlew .
RUN dos2unix ./gradlew
# --- build-env
FROM docker.io/gradle:8-jdk as build-env
ARG SKIP_TESTS
WORKDIR /appbuild
COPY . /appbuild
# copy converted Windows line endings files
COPY --from=dos2unix-env /convert/gradlew .
# cache Gradle dependencies
VOLUME /home/gradle/.gradle
RUN if [ -z "$SKIP_TESTS" ]; \
then echo "* Running full build" && gradle -i clean build installDist; \
else echo "* Building but skipping tests" && gradle -i clean installDist -x test; \
fi
# --- opa-env
FROM docker.io/openpolicyagent/opa:0.46.1-static as opa-env
# --- iota-env
FROM docker.io/waltid/waltid_iota_identity_wrapper:latest as iota-env
# --- app-env
FROM docker.io/eclipse-temurin:19 AS app-env
WORKDIR /app
COPY --from=opa-env /opa /usr/local/bin/opa
COPY --from=iota-env /usr/local/lib/libwaltid_iota_identity_wrapper.so /usr/local/lib/libwaltid_iota_identity_wrapper.so
RUN ldconfig
COPY --from=build-env /appbuild/build/install/waltid-walletkit /app/
COPY --from=build-env /appbuild/service-matrix.properties /app/
COPY --from=build-env /appbuild/config /app/config
### Execution
EXPOSE 7000 7001 7002 7003 7004 7010
ENTRYPOINT ["/app/bin/waltid-walletkit"]