diff --git a/Dockerfile b/Dockerfile index 8864eb2..9a07ba5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM openjdk:11-jre-slim as builder +FROM openjdk:21-slim as builder ARG CEREBRO_VERSION=0.9.4 @@ -9,7 +9,7 @@ RUN apt-get update \ | tar xzv --strip-components 1 -C /opt/cerebro \ && sed -i '//d' /opt/cerebro/conf/logback.xml -FROM openjdk:11-jre-slim +FROM openjdk:21-slim COPY --from=builder /opt/cerebro /opt/cerebro @@ -22,4 +22,7 @@ RUN addgroup -gid 1000 cerebro \ WORKDIR /opt/cerebro USER cerebro +# At least with Cerebro 0.9.4 some JVM options are required to run on openjdk 16+. See https://github.com/lmenezes/cerebro/issues/514 +ENV JAVA_OPTS "--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/sun.net.www.protocol.file=ALL-UNNAMED" + ENTRYPOINT [ "/opt/cerebro/bin/cerebro" ]