small multi-platform image
[dmaap/kafka11aaf.git] / src / main / docker / Dockerfile
1 #########
2 #  ============LICENSE_START====================================================
3 #  org.onap.dmaap
4 #  ===========================================================================
5 #  Copyright © 2017 AT&T Intellectual Property. All rights reserved.
6 #  Modifications Copyright (C) 2018 Nokia. All rights reserved.
7 #  ===========================================================================
8 #  Licensed under the Apache License, Version 2.0 (the "License");
9 #  you may not use this file except in compliance with the License.
10 #  You may obtain a copy of the License at
11 #
12 #       http://www.apache.org/licenses/LICENSE-2.0
13 #
14 #  Unless required by applicable law or agreed to in writing, software
15 #  distributed under the License is distributed on an "AS IS" BASIS,
16 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 #  See the License for the specific language governing permissions and
18 #  limitations under the License.
19 #  ============LICENSE_END====================================================
20 #
21 FROM openjdk:8-alpine
22
23 MAINTAINER DMAAP Team
24
25 ARG kafka_version=0.11.0.1
26 ARG scala_version=2.12
27
28 VOLUME ["/kafka"]
29
30 ENV KAFKA_VERSION $kafka_version
31 ENV SCALA_VERSION $scala_version
32 ENV KAFKA_HOME /opt/kafka
33 ENV PATH ${PATH}:${KAFKA_HOME}/bin
34
35 COPY broker-list.sh \
36     create-topics.sh \
37     start-kafka.sh \
38     start-kafkaOrMirrorMaker.sh \
39     start-mirrormaker.sh \
40     /usr/bin/ 
41
42 COPY mmagent.config \
43     consumer.properties \
44     producer.properties \
45     /opt/etc/
46
47 COPY cadi.properties \
48     download-kafka.sh \
49     kafka_server_jaas.conf \
50     kafka-run-class.sh \
51     keyfilenew \
52     org.onap.dmaap.mr.p12 \
53     truststoreONAPall.jks \
54     kafka11aaf-jar-with-dependencies.jar \
55     dmaapMMAgent.jar \
56     /tmp/
57
58 RUN apk add --update bash unzip wget curl docker jq coreutils && \
59     chmod a+x /usr/bin/start-kafka.sh && \
60     chmod a+x /usr/bin/broker-list.sh && \
61     chmod a+x /usr/bin/start-kafkaOrMirrorMaker.sh && \
62     chmod a+x /usr/bin/start-mirrormaker.sh && \
63     chmod a+x /usr/bin/create-topics.sh && \
64     chmod a+x /tmp/download-kafka.sh && \
65     sync && \
66     /tmp/download-kafka.sh && \
67     tar xfz /tmp/kafka_${SCALA_VERSION}-${KAFKA_VERSION}.tgz -C /opt && \
68     rm /tmp/kafka_${SCALA_VERSION}-${KAFKA_VERSION}.tgz && \
69     ln -s /opt/kafka_${SCALA_VERSION}-${KAFKA_VERSION} /opt/kafka
70     
71
72 WORKDIR /usr/bin
73 CMD ["start-kafkaOrMirrorMaker.sh"]