Skip to content

Instantly share code, notes, and snippets.

@iolloyd
Last active October 26, 2018 08:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iolloyd/58997d43f97bd761607fb64ad816ca2e to your computer and use it in GitHub Desktop.
Save iolloyd/58997d43f97bd761607fb64ad816ca2e to your computer and use it in GitHub Desktop.
couples kafka and zookeeper together
FROM java:openjdk-8-jre
ENV DEBIAN_FRONTEND noninteractive
ENV SCALA_VERSION 2.11.12
ENV KAFKA_VERSION 2.0.0
ENV KAFKA_HOME /opt/kafka_"$SCALA_VERSION"-"$KAFKA_VERSION"
RUN apt-get update && \
apt-get install -y dnsutils supervisor wget zookeeper && \
rm -rf /var/lib/apt/lists/* && \
apt-get clean && \
wget -q http://apache.mirrors.spacedump.net/kafka/"$KAFKA_VERSION"/kafka_"$SCALA_VERSION"-"$KAFKA_VERSION".tgz -O /tmp/kafka_"$SCALA_VERSION"-"$KAFKA_VERSION".tgz && \
tar xfz /tmp/kafka_"$SCALA_VERSION"-"$KAFKA_VERSION".tgz -C /opt && \
rm /tmp/kafka_"$SCALA_VERSION"-"$KAFKA_VERSION".tgz
ADD scripts/start-kafka.sh /usr/bin/start-kafka.sh
ADD supervisor/kafka.conf supervisor/zookeeper.conf /etc/supervisor/conf.d/
EXPOSE 2181 9092
CMD ["supervisord", "-n"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment