forked from walt-id/waltid-ssikit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
36 lines (26 loc) · 1.02 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
FROM docker.io/openjdk:17-slim-buster AS openjdk-gradle
ENV GRADLE_HOME /opt/gradle
RUN set -o errexit -o nounset \
&& echo "Adding gradle user and group" \
&& groupadd --system --gid 1000 gradle \
&& useradd --system --gid gradle --uid 1000 --shell /bin/bash --create-home gradle \
&& mkdir /home/gradle/.gradle \
&& chown --recursive gradle:gradle /home/gradle \
\
&& echo "Symlinking root Gradle cache to gradle Gradle cache" \
&& ln -s /home/gradle/.gradle /root/.gradle
VOLUME /home/gradle/.gradle
WORKDIR /opt
RUN apt-get update && apt-get upgrade --yes
FROM openjdk-gradle AS walt-build
COPY ./ /opt
RUN ./gradlew clean build
RUN tar xf /opt/build/distributions/waltid-ssi-kit-*.tar -C /opt
FROM openjdk:17-slim-buster
RUN mkdir /app
COPY --from=walt-build /opt/waltid-ssi-kit-* /app/
COPY --from=walt-build /opt/service-matrix.properties /app/
COPY --from=walt-build /opt/signatory.conf /app/
COPY --from=walt-build /opt/fsStore.conf /app/
WORKDIR /app
ENTRYPOINT ["/app/bin/waltid-ssi-kit"]