forked from eclipse-edc/FederatedCatalog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
26 lines (18 loc) · 756 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
# -buster is required to have apt available
FROM openjdk:17-slim-buster
# Optional JVM arguments, such as memory settings
ARG JVM_ARGS=""
RUN apt update \
&& apt install -y curl \
&& rm -rf /var/cache/apt/archives /var/lib/apt/lists
WORKDIR /app
COPY ./build/libs/fc-mocked.jar /app
EXPOSE 8182
ENV WEB_HTTP_PORT="8181"
ENV WEB_HTTP_PATH="/api"
HEALTHCHECK --interval=5s --timeout=5s --retries=10 CMD curl --fail http://localhost:8181/api/check/health
# Use "exec" for graceful termination (SIGINT) to reach JVM.
# ARG can not be used in ENTRYPOINT so storing value in an ENV variable
ENV ENV_JVM_ARGS=$JVM_ARGS
ENV ENV_APPINSIGHTS_AGENT_VERSION=$APPINSIGHTS_AGENT_VERSION
ENTRYPOINT [ "sh", "-c", "exec java $ENV_JVM_ARGS -jar fc-mocked.jar"]