forked from hashgraph/did-sdk-java
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
34 lines (23 loc) · 849 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
#
# build in a temporary container
#
FROM adoptopenjdk:12-jdk-hotspot AS build
COPY ./ /opt/hedera-did
WORKDIR /opt/hedera-did
#RUN ./gradlew --no-daemon
RUN ./gradlew --no-daemon assemble
#
# run in a fresh container, copying files from build container above
#
FROM adoptopenjdk:12-jre-hotspot
# make a place to put our built JAR and copy it to there
WORKDIR /srv
COPY --from=build /opt/hedera-did/examples/appnet-api-server/build/libs/appnet-api-server.jar /srv/appnet-api-server.jar
COPY --from=build /opt/hedera-did/examples/.env /srv/.env
COPY --from=build /opt/hedera-did/previewnet.json /srv/previewnet.json
COPY --from=build /opt/hedera-did/testnet.json /srv/testnet.json
COPY --from=build /opt/hedera-did/mainnet.json /srv/mainnet.json
VOLUME /srv/data
# run the micro service
CMD java "-jar" "appnet-api-server.jar"
EXPOSE 5050