[ansible][fedora] Update package name
[barometer.git] / docker / barometer-kafka / Dockerfile
1 # Copyright 2017-2019 Intel Corporation and OPNFV. All rights reserved.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 # http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 #
15
16 FROM centos:7
17 RUN yum update -y && yum install -y epel-release \
18                    wget \
19                    https://archive.cloudera.com/cdh5/one-click-install/redhat/7/x86_64/cloudera-cdh-5-0.x86_64.rpm \
20                    java-1.7.0-openjdk
21 RUN yum install -y python-pip
22
23 RUN pip install kafka-python
24
25 ENV repos_dir /src
26 WORKDIR ${repos_dir}
27 EXPOSE 9092
28
29 RUN wget "https://archive.apache.org/dist/kafka/1.0.0/kafka_2.11-1.0.0.tgz"
30 RUN tar -xzf kafka_2.11-1.0.0.tgz
31 RUN sed -i -- 's/#delete.topic.enable=true/delete.topic.enable=true/' kafka_2.11-1.0.0/config/server.properties
32
33 COPY start_kafka.sh .
34 RUN chmod 755 start_kafka.sh
35 ENTRYPOINT ["/src/start_kafka.sh"]