-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
34 lines (24 loc) · 889 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
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-siwe-*.tar -C /opt
FROM openjdk:17-slim-buster
RUN mkdir /app
COPY --from=walt-build /opt/waltid-siwe-* /app/
WORKDIR /app
ENTRYPOINT ["/app/bin/waltid-siwe"]
EXPOSE 7000