forked from IBM/sarama
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.kafka
26 lines (19 loc) · 1.31 KB
/
Dockerfile.kafka
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest
USER root
RUN microdnf update \
&& microdnf install curl gzip java-11-openjdk-headless tar \
&& microdnf clean all
ENV JAVA_HOME=/usr/lib/jvm/jre-11
# https://docs.oracle.com/javase/7/docs/technotes/guides/net/properties.html
# Ensure Java doesn't cache any dns results
RUN cd /etc/java/java-11-openjdk/*/conf/security \
&& sed -e '/networkaddress.cache.ttl/d' -e '/networkaddress.cache.negative.ttl/d' -i java.security \
&& echo 'networkaddress.cache.ttl=0' >> java.security \
&& echo 'networkaddress.cache.negative.ttl=0' >> java.security
# https://github.com/apache/kafka/blob/0d518aaed158896ee9ee6949b8f38128d1d73634/tests/docker/Dockerfile#L65-L67
ARG KAFKA_MIRROR="https://s3-us-west-2.amazonaws.com/kafka-packages"
RUN mkdir -p "/opt/kafka-2.8.1" && chmod a+rw /opt/kafka-2.8.1 && curl -s "$KAFKA_MIRROR/kafka_2.12-2.8.1.tgz" | tar xz --strip-components=1 -C "/opt/kafka-2.8.1"
RUN mkdir -p "/opt/kafka-3.0.1" && chmod a+rw /opt/kafka-3.0.1 && curl -s "$KAFKA_MIRROR/kafka_2.12-3.0.1.tgz" | tar xz --strip-components=1 -C "/opt/kafka-3.0.1"
RUN mkdir -p "/opt/kafka-3.1.0" && chmod a+rw /opt/kafka-3.1.0 && curl -s "$KAFKA_MIRROR/kafka_2.12-3.1.0.tgz" | tar xz --strip-components=1 -C "/opt/kafka-3.1.0"
COPY entrypoint.sh /
ENTRYPOINT ["/entrypoint.sh"]