forked from sheepkiller/kafka-manager-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
32 lines (25 loc) · 1.04 KB
/
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
FROM centos:7
MAINTAINER Clement Laforet <[email protected]>
RUN yum update -y && \
yum install -y java-1.8.0-openjdk-headless && \
yum clean all
ENV JAVA_HOME=/usr/java/default/ \
ZK_HOSTS=localhost:2181 \
KM_VERSION=2.0.0.2 \
KM_CONFIGFILE="conf/application.conf"
ADD start-kafka-manager.sh /kafka-manager-${KM_VERSION}/start-kafka-manager.sh
RUN yum install -y java-1.8.0-openjdk-devel git wget unzip which && \
mkdir -p /tmp && \
cd /tmp && \
git clone https://github.com/xaecbd/kafka-manager.git && \
cd /tmp/kafka-manager && \
echo 'scalacOptions ++= Seq("-Xmax-classfile-name", "200")' >> build.sbt && \
./sbt clean dist && \
unzip -d / ./target/universal/kafka-manager-${KM_VERSION}.zip && \
rm -fr /tmp/* /root/.sbt /root/.ivy2 && \
chmod +x /kafka-manager-${KM_VERSION}/start-kafka-manager.sh && \
yum autoremove -y java-1.8.0-openjdk-devel git wget unzip which && \
yum clean all
WORKDIR /kafka-manager-${KM_VERSION}
EXPOSE 9000
ENTRYPOINT ["./start-kafka-manager.sh"]