Public Repository

Last pushed: 2 years ago
Short Description
Kafka
Full Description
FROM phusion/baseimage:0.9.16

ENV DEBIAN_FRONTEND noninteractive

RUN apt-get update
RUN apt-get install -y wget supervisor dnsutils openjdk-7-jdk
RUN rm /bin/sh && ln -s /bin/bash /bin/sh

RUN mkdir -p /{opt,var,etc}/{zookeeper,kafka}

# Download packages
RUN wget -O- http://mirrors.advancedhosters.com/apache/zookeeper/stable/zookeeper-3.4.6.tar.gz | tar xzf - --strip=1 -C "/opt/zookeeper"
RUN wget -O- http://apache.cs.utah.edu/kafka/0.8.2.1/kafka_2.10-0.8.2.1.tgz | tar xzf - --strip=1 -C "/opt/kafka"

ENV KAFKA_HOME /opt/kafka
ENV ZOOKEEPER_HOME /opt/zookeeper

# Set up Zookeeper
RUN cp $KAFKA_HOME/config/zookeeper.properties $ZOOKEEPER_HOME/conf/zoo.cfg
RUN printf "[program:zookeeper]\ncommand=/opt/zookeeper/bin/zkServer.sh start\nautostart=true\nautorestart=true" > /etc/supervisor/conf.d/zookeeper.conf
EXPOSE 2181

# Set up Kafka
RUN printf "[program:kafka]\ncommand=/opt/kafka/bin/kafka-server-start.sh $KAFKA_HOME/config/server.properties\nautostart=true\nautorestart=true" > /etc/supervisor/conf.d/kafka.conf
EXPOSE 9092

CMD supervisord -n
Docker Pull Command
Owner
better

Comments (0)