forked from Modius22/docker-kafka-standalone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dockerfile
34 lines (26 loc) · 911 Bytes
/
dockerfile
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
27
28
29
30
31
32
33
34
from centos:latest
RUN yum update -y
RUN yum install vim wget dnsutils -y
WORKDIR /app
#java
COPY files/jdk-8u191-linux-x64.rpm /app/
RUN yum install /app/jdk-8u191-linux-x64.rpm -y
ENV JAVA_HOME /usr/java/latest
#Zookeeper
RUN wget http://www-eu.apache.org/dist/zookeeper/zookeeper-3.4.13/zookeeper-3.4.13.tar.gz
RUN tar -zxvf zookeeper-3.4.13.tar.gz -C /app
RUN mv /app/zookeeper-3.4.13/ /app/zookeeper
COPY files/zoo.cfg /app/zookeeper/conf/
COPY files/log4j.properties /app/zookeeper/conf/
RUN mkdir /app/zookeeper/logs
#Kafka
RUN wget http://www-eu.apache.org/dist/kafka/2.0.0/kafka_2.12-2.0.0.tgz
RUN tar -zxvf kafka_2.12-2.0.0.tgz -C /app/
RUN mv /app/kafka_2.12-2.0.0/ /app/kafka
ENV JMX_PORT=${JMX_PORT:-9999}
ENV KAFKA_HEAP_OPTS="-Xmx256M -Xms128M"
COPY files/kafka-run-class.sh /app/kafka/bin/
EXPOSE 2181 9092
COPY files/start.sh /app/start.sh
RUN chmod 777 /app/start.sh
CMD /app/start.sh