cub repariert (wurde durch Einbindung des REHL-Repos gestört)
[demos/kafka/training] / Dockerfile
1 ARG VERSION=7.5.1
2
3 FROM confluentinc/cp-base-new:${VERSION}
4
5 WORKDIR /build
6
7 ENV BUILD_PACKAGES="which git make cmake gcc-c++ zlib-devel curl curl-devel openssl-devel cyrus-sasl-devel pkgconfig lz4-devel wget tar findutils"
8
9
10 USER root
11
12 ENV KAFKACAT_VERSION="1.7.1"
13 RUN \
14   echo "Preparing the build-environment ....." && \
15   yum install -y $BUILD_PACKAGES && \
16   echo "Building kafkacat ....." && \
17   git clone https://github.com/edenhill/kafkacat && \
18   cd kafkacat && \
19   git checkout tags/$KAFKACAT_VERSION && \
20   ./bootstrap.sh && \
21   make && \
22   ldd kcat && \
23   cd /build
24
25 # TODO...
26 #
27 # ENV NORMCAT_VERSION="1.1.1"
28 # RUN \
29 #   echo "Fetching normcat ....." && \
30 #   wget https://github.com/andmarios/normcat/releases/download/${NORMCAT_VERSION}/normcat-${NORMCAT_VERSION}-linux-amd64-lowmem.tar.gz -O normcat.tgz && \
31 #   tar -xzf normcat.tgz -C /build/
32 #
33 # ENV PUMBA_VERSION="0.6.5"
34 # RUN \
35 #   echo "Fetching pumba ....." && \
36 #   wget https://github.com/alexei-led/pumba/releases/download/${PUMBA_VERSION}/pumba_linux_amd64 && \
37 #   mv pumba_linux_amd64 pumba && \
38 #   chmod a+x pumba
39 #
40 # RUN \
41 #   echo "Fetching zk-smoketest ....." && \
42 #   wget https://github.com/phunt/zk-smoketest/archive/master.zip -O zk-smoketest.zip && \
43 #   unzip zk-smoketest.zip && \
44 #   echo "installing zktop ....." && \
45 #   pip install -b . -t ./zk-smoketest-master zktop && \
46 #   echo "Building zkpython ....." && \
47 #   pip install -b . -t ./zk-smoketest-master zkpython
48
49
50
51 FROM confluentinc/cp-kafka-connect:${VERSION}
52
53 USER root
54 RUN \
55   echo "Installing runtime dependencies for SSL and SASL support ...." && \
56   yum install -y ca-certificates && \
57   echo "Installing usefull tools" && \
58   yum install -y curl wget nc less jq -y && \
59   echo "===> clean up ..."  && \
60   yum clean all && \
61   rm -rf /tmp/* /etc/yum.repos.d/confluent.repo && \
62   curl https://packages.httpie.io/binaries/linux/http-latest --output /usr/local/bin/http && \
63   chmod a+x /usr/local/bin/http
64
65 COPY --from=0 /build/kafkacat/kcat /usr/local/bin/
66 # COPY --from=0 /build/normcat /usr/local/bin/
67 # COPY --from=0 /build/pumba /usr/local/bin/
68 # COPY --from=0 /build/zk-smoketest-master /usr/local/bin/
69 ADD https://github.com/jiaqi/jmxterm/releases/download/v1.0.2/jmxterm-1.0.2-uber.jar /usr/local/bin/jmxterm.jar
70 RUN \
71   ln -s /usr/local/bin/kcat /usr/local/bin/kafkacat && \
72   chmod a+x /usr/local/bin/*
73
74 # Specify a default mount point and working directory
75 VOLUME ["/mnt"]
76 WORKDIR /mnt
77
78 # Define default command.
79 CMD ["bash", "-i"]