WIP:prometheus
[demos/kafka/monitoring] / toolbox / Dockerfile
1 ARG VERSION=7.3.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.0"
13 RUN \
14   echo "Preparing the build-environment ....." && \
15   dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm && \
16   dnf install -y $BUILD_PACKAGES && \
17   echo "Building kafkacat ....." && \
18   git clone https://github.com/edenhill/kafkacat && \
19   cd kafkacat && \
20   git checkout tags/$KAFKACAT_VERSION && \
21   ./bootstrap.sh && \
22   make && \
23   ldd kcat && \
24   cd /build
25
26 # TODO...
27 #
28 # ENV NORMCAT_VERSION="1.1.1"
29 # RUN \
30 #   echo "Fetching normcat ....." && \
31 #   wget https://github.com/andmarios/normcat/releases/download/${NORMCAT_VERSION}/normcat-${NORMCAT_VERSION}-linux-amd64-lowmem.tar.gz -O normcat.tgz && \
32 #   tar -xzf normcat.tgz -C /build/
33 #
34 # ENV PUMBA_VERSION="0.6.5"
35 # RUN \
36 #   echo "Fetching pumba ....." && \
37 #   wget https://github.com/alexei-led/pumba/releases/download/${PUMBA_VERSION}/pumba_linux_amd64 && \
38 #   mv pumba_linux_amd64 pumba && \
39 #   chmod a+x pumba
40 #
41 # RUN \
42 #   echo "Fetching zk-smoketest ....." && \
43 #   wget https://github.com/phunt/zk-smoketest/archive/master.zip -O zk-smoketest.zip && \
44 #   unzip zk-smoketest.zip && \
45 #   echo "installing zktop ....." && \
46 #   pip install -b . -t ./zk-smoketest-master zktop && \
47 #   echo "Building zkpython ....." && \
48 #   pip install -b . -t ./zk-smoketest-master zkpython
49
50
51
52 FROM confluentinc/cp-kafka-connect:${VERSION}
53
54 USER root
55 RUN \
56   echo "Installing runtime dependencies for SSL and SASL support ...." && \
57   microdnf install dnf && \
58   dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm && \
59   dnf install -y ca-certificates && \
60   echo "Installing usefull tools" && \
61   dnf install -y curl wget nc less httpie jq -y && \
62   echo "===> clean up ..."  && \
63   dnf clean all && \
64   rm -rf /tmp/*
65
66 COPY --from=0 /build/kafkacat/kcat /usr/local/bin/
67 # COPY --from=0 /build/normcat /usr/local/bin/
68 # COPY --from=0 /build/pumba /usr/local/bin/
69 # COPY --from=0 /build/zk-smoketest-master /usr/local/bin/
70 ADD https://github.com/jiaqi/jmxterm/releases/download/v1.0.2/jmxterm-1.0.2-uber.jar /usr/local/bin/jmxterm.jar
71 RUN \
72   ln -s /usr/local/bin/kcat /usr/local/bin/kafkacat && \
73   chmod a+x /usr/local/bin/*
74
75 # Specify a default mount point and working directory
76 VOLUME ["/mnt"]
77 WORKDIR /mnt
78
79 # Define default command.
80 CMD ["bash", "-i"]