Skip to content

Use java21 for pulsar 4 0 + #809

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

Merged
merged 7 commits into from
May 30, 2025
Merged
Show file tree
Hide file tree
Changes from 5 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
29 changes: 27 additions & 2 deletions images/pulsar-functions-base-runner/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,12 @@ RUN echo "VERSION_TAG=${VERSION_TAG}" && \
elif [ $VERSION_MAJOR -eq 2 ] && [ $VERSION_MINOR -eq 11 ]; then \
echo "Pulsar version is 2.11, use java 17" && \
export JRE_PACKAGE_NAME='openjdk17 gcompat'; \
else \
echo "Pulsar version is not in the list, use java 17 instead" && \
elif [ $VERSION_MAJOR -eq 3 ]; then \
echo "Pulsar version is 3.x, use java 17 instead" && \
export JRE_PACKAGE_NAME='openjdk17 gcompat'; \
else \
echo "Pulsar version is not in the list, use java 21 instead" && \
export JRE_PACKAGE_NAME='openjdk21 gcompat'; \
fi && \
apk update && apk add --no-cache $JRE_PACKAGE_NAME bash

Expand All @@ -64,4 +67,26 @@ RUN rm -rf /pulsar/bin/pulsar-detector || true
ENV PULSAR_ROOT_LOGGER=INFO,CONSOLE
ENV java.io.tmpdir=/pulsar/tmp/

# Copy the kinesis_producer native executable compiled for Alpine musl to the runner image
# This is required to support the Pulsar IO Kinesis sink connector
COPY --from=pulsar --chown=$UID:$GID /opt/amazon-kinesis-produce* /opt/amazon-kinesis-producer
# Set the environment variable to point to the kinesis_producer native executable
ENV PULSAR_IO_KINESIS_KPL_PATH=/opt/amazon-kinesis-producer/bin/kinesis_producer
# Install the required dependencies for the kinesis_producer native executable
USER 0
RUN apk update && apk add --no-cache \
brotli-libs \
c-ares \
libcrypto3 \
libcurl \
libgcc \
libidn2 \
libpsl \
libssl3 \
libunistring \
nghttp2-libs \
zlib \
zstd-libs \
libuuid

WORKDIR /pulsar
3 changes: 0 additions & 3 deletions images/pulsar-functions-base-runner/pulsarctl.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
ARG PULSAR_IMAGE
ARG PULSAR_IMAGE_TAG
FROM ${PULSAR_IMAGE}:${PULSAR_IMAGE_TAG} as pulsar
FROM alpine:3.20 as functions-runner

ENV GID=10001
Expand Down
29 changes: 27 additions & 2 deletions images/pulsar-functions-java-runner/pulsarctl.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,12 @@ RUN echo "VERSION_TAG=${VERSION_TAG}" && \
elif [ $VERSION_MAJOR -eq 2 ] && [ $VERSION_MINOR -eq 11 ]; then \
echo "Pulsar version is 2.11, use java 17" && \
export JRE_PACKAGE_NAME='openjdk17 gcompat'; \
else \
echo "Pulsar version is not in the list, use java 17 instead" && \
elif [ $VERSION_MAJOR -eq 3 ]; then \
echo "Pulsar version is 3.x, use java 17" && \
export JRE_PACKAGE_NAME='openjdk17 gcompat'; \
else \
echo "Pulsar version is not in the list, use java 21 instead" && \
export JRE_PACKAGE_NAME='openjdk21 gcompat'; \
fi && \
apk update && apk add --no-cache $JRE_PACKAGE_NAME

Expand All @@ -53,4 +56,26 @@ ENV java.io.tmpdir=/pulsar/tmp/

WORKDIR /pulsar

# Copy the kinesis_producer native executable compiled for Alpine musl to the pulsar-all image
# This is required to support the Pulsar IO Kinesis sink connector
COPY --from=pulsar --chown=$UID:$GID /opt/amazon-kinesis-produce* /opt/amazon-kinesis-producer
# Set the environment variable to point to the kinesis_producer native executable
ENV PULSAR_IO_KINESIS_KPL_PATH=/opt/amazon-kinesis-producer/bin/kinesis_producer
# Install the required dependencies for the kinesis_producer native executable
USER 0
RUN apk update && apk add --no-cache \
brotli-libs \
c-ares \
libcrypto3 \
libcurl \
libgcc \
libidn2 \
libpsl \
libssl3 \
libunistring \
nghttp2-libs \
zlib \
zstd-libs \
libuuid

USER $USER
Loading