forked from hapifhir/org.hl7.fhir.validator-wrapper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
23 lines (16 loc) · 1.06 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
# This line tells Docker to base an image on a pre-built image with Alpine Linux. You can use other images from Amazon
# Corretto registry. Alpine Linux benefit is that the image is pretty small.
FROM amazoncorretto:11-alpine3.19
ENV APPLICATION_USER ktor
RUN adduser -D -g '' $APPLICATION_USER
RUN mkdir /app
RUN chown -R $APPLICATION_USER /app
USER $APPLICATION_USER
# These lines copy the packaged application into the Docker image and sets the working directory to where it was copied.
COPY ./build/libs/validator-wrapper-jvm-*.jar /app/validator-wrapper.jar
WORKDIR /app
# Environment vars here
ENV ENVIRONMENT prod
EXPOSE 3500
# The last line instructs Docker to run java with G10s GC, assigns 79% of the system's available memory, and indicates the packaged application.
CMD ["java", "-server", "-XX:+UnlockExperimentalVMOptions", "-XX:InitialRAMPercentage=79", "-XX:MinRAMPercentage=79", "-XX:MaxRAMPercentage=79", "-XX:+UseG1GC", "-XX:MaxGCPauseMillis=100", "-XX:+UseStringDeduplication", "-XX:+CrashOnOutOfMemoryError", "-jar", "validator-wrapper.jar", "-startServer"]