Open bigOconstant opened 5 years ago
I was able to get the build working by changing the docker file to the following (Maybe this will help with an official fix)
# Kafka and Zookeeper
FROM java:openjdk-8-jre
ENV DEBIAN_FRONTEND noninteractive
ENV SCALA_VERSION 2.11
ENV KAFKA_VERSION 2.1.1
ENV KAFKA_HOME /opt/kafka_"$SCALA_VERSION"-"$KAFKA_VERSION"
RUN echo "deb [check-valid-until=no] http://archive.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/jessie-backports.list
RUN sed -i '/deb http:\/\/deb.debian.org\/debian jessie-updates main/d' /etc/apt/sources.list
# As suggested by a user, for some people this line works instead of the first one. Use whichever works for your case
# RUN echo "deb [check-valid-until=no] http://archive.debian.org/debian jessie main" > /etc/apt/sources.list.d/jessie.list
# Install Kafka, Zookeeper and other needed things
RUN apt-get -o Acquire::Check-Valid-Until=false update && \
apt-get -o Acquire::Check-Valid-Until=false install -y zookeeper wget supervisor dnsutils && \
rm -rf /var/lib/apt/lists/* && \
apt-get clean && \
wget -q http://apache.mirrors.spacedump.net/kafka/2.1.1/kafka_"$SCALA_VERSION"-2.1.1.tgz -O /tmp/kafka_"$SCALA_VERSION"-2.1.1.tgz && \
tar xfz /tmp/kafka_2.11-2.1.1.tgz -C /opt && \
rm /tmp/kafka_2.11-2.1.1.tgz
ADD scripts/start-kafka.sh /usr/bin/start-kafka.sh
# Supervisor config
ADD supervisor/kafka.conf supervisor/zookeeper.conf /etc/supervisor/conf.d/
# 2181 is zookeeper, 9092 is kafka
EXPOSE 2181 9092
CMD ["supervisord", "-n"]
@camccar thank you for posting your work around, this worked for me. very timely too, just started playing around with this today and hit the same error.
While it did build my kafka instance seems to crash afterwords. I'm trying to add sasl plain text auth to test a script.
@dude0001 Is your kafka instance working for you?
I had to add a line to make start-kafka.sh executable. Other than that, it seems to startup for me. I haven't done more with it yet.
After the existing line
ADD scripts/start-kafka.sh /usr/bin/start-kafka.sh
I added
RUN chmod a+x /usr/bin/start-kafka.sh
If someone ends up here, this is also a viable solution for stepping versions. Change the beginning of the Dockerfile under kafka dir:
FROM openjdk:11-jre
ENV DEBIAN_FRONTEND noninteractive
ENV SCALA_VERSION 2.13
ENV KAFKA_VERSION 2.4.0
ENV KAFKA_HOME /opt/kafka_"$SCALA_VERSION"-"$KAFKA_VERSION"
I tried
and I get the following error