This repository has been archived by the owner on Jun 11, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
executable file
·52 lines (45 loc) · 1.85 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Kafka (Vanilla) on CentOS 7.
# Copyright (C) 2017-2018 Rodrigo Martínez <[email protected]>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
FROM brunneis/jdk-centos:1.8
MAINTAINER "Rodrigo Martínez" <[email protected]>
################################################
# KAFKA
################################################
ARG KAFKA_VERSION
ARG KAFKA_SUBVERSION
ENV KAFKA_ARCHIVE kafka_$KAFKA_SUBVERSION-$KAFKA_VERSION.tgz
ENV KAFKA_ARCHIVE_URL https://archive.apache.org/dist/kafka/$KAFKA_VERSION/$KAFKA_ARCHIVE
ENV KAFKA_SHA1_URL $KAFKA_ARCHIVE_URL.sha1
ENV KAFKA_INSTALL_DIR /opt/kafka
# Install Kafka
RUN \
yum -y update && yum clean all \
&& yum -y install \
wget \
&& wget $KAFKA_ARCHIVE_URL \
&& wget $KAFKA_SHA1_URL \
&& mkdir $KAFKA_INSTALL_DIR \
&& sha1sum $KAFKA_ARCHIVE.sha1 \
&& tar xvf $KAFKA_ARCHIVE -C $KAFKA_INSTALL_DIR \
&& rm -f $KAFKA_ARCHIVE \
&& rm -f $KAFKA_ARCHIVE.sha1 \
&& ln -s $KAFKA_INSTALL_DIR/*kafka* $KAFKA_INSTALL_DIR/default
# Add Kafka binaries to PATH
ENV PATH=$KAFKA_INSTALL_DIR/default/bin:$PATH
# Overwrite default configuration files
COPY config $KAFKA_INSTALL_DIR/default/config
COPY bin $KAFKA_INSTALL_DIR/default/bin
# Start Kafka (standalone mode)
COPY entrypoint.sh /
ENTRYPOINT ["bash", "entrypoint.sh"]