Skip to content

Commit

Permalink
Upgrade docker container to openjdk 17 (#318)
Browse files Browse the repository at this point in the history
To support `UseContainerSupport` (set by default) and reliably use
`MaxRAMPercentage`.

When running in a (docker) container use the memory limit of the runtime
environment / cgroup and set environment variable `JAVA_TOOL_OPTIONS` to
`-XX:MaxRAMPercentage=75` to make sure the JVM uses at least 75% of the
allocated memory.  Note that 75% is a safe setting.
  • Loading branch information
remvee authored Jul 9, 2024
1 parent 0b908b6 commit 81f744e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
FROM clojure:temurin-11-lein-2.9.10-alpine as builder
FROM clojure:temurin-17-lein-2.11.2-alpine as builder

RUN mkdir /app
WORKDIR /app
COPY . /app/
RUN lein uberjar

FROM gcr.io/distroless/java:11
FROM gcr.io/distroless/java17-debian12
COPY --from=builder /app/target/eduhub-rio-mapper.jar /eduhub-rio-mapper.jar

ENTRYPOINT ["java", "-jar", "/eduhub-rio-mapper.jar"]

0 comments on commit 81f744e

Please sign in to comment.