Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to jdk 21 #27

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM openjdk:11-jre-slim as builder
FROM openjdk:21-slim as builder

ARG CEREBRO_VERSION=0.9.4

Expand All @@ -9,7 +9,7 @@ RUN apt-get update \
| tar xzv --strip-components 1 -C /opt/cerebro \
&& sed -i '/<appender-ref ref="FILE"\/>/d' /opt/cerebro/conf/logback.xml

FROM openjdk:11-jre-slim
FROM openjdk:21-slim

COPY --from=builder /opt/cerebro /opt/cerebro

Expand All @@ -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" ]