102ade00cbdef6667599169fd75adcc0d77cb67f
[dmaap/kafka11aaf.git] / src / main / docker / Dockerfile
1 FROM anapsix/alpine-java
2
3 ARG kafka_version=0.11.0.1
4 ARG scala_version=2.12
5
6
7 RUN apk add --update unzip wget curl docker jq coreutils
8
9 ENV KAFKA_VERSION=$kafka_version SCALA_VERSION=$scala_version
10 ADD download-kafka.sh /tmp/download-kafka.sh
11 ADD kafka_server_jaas.conf /tmp/kafka_server_jaas.conf
12 ADD truststoreONAPall.jks /tmp/truststoreONAPall.jks
13 ADD org.onap.dmaap.mr.p12 /tmp/org.onap.dmaap.mr.p12
14 ADD keyfilenew /tmp/keyfilenew
15 ADD cadi.properties /tmp/cadi.properties
16 ADD kafka11aaf-jar-with-dependencies.jar /tmp/kafka11aaf-jar-with-dependencies.jar
17
18 RUN chmod a+x /tmp/download-kafka.sh && sync && /tmp/download-kafka.sh && tar xfz /tmp/kafka_${SCALA_VERSION}-${KAFKA_VERSION}.tgz -C /opt && rm /tmp/kafka_${SCALA_VERSION}-${KAFKA_VERSION}.tgz && ln -s /opt/kafka_${SCALA_VERSION}-${KAFKA_VERSION} /opt/kafka
19
20 VOLUME ["/kafka"]
21
22 ENV KAFKA_HOME /opt/kafka
23 ENV PATH ${PATH}:${KAFKA_HOME}/bin
24 ADD start-kafka.sh /usr/bin/start-kafka.sh
25 ADD broker-list.sh /usr/bin/broker-list.sh
26 ADD create-topics.sh /usr/bin/create-topics.sh
27 # The scripts need to have executable permission
28 RUN chmod a+x /usr/bin/start-kafka.sh && \
29     chmod a+x /usr/bin/broker-list.sh && \
30     chmod a+x /usr/bin/create-topics.sh
31 # Use "exec" form so that it runs as PID 1 (useful for graceful shutdown)
32 CMD ["start-kafka.sh"]