use multi-stage for kafkacat; bump to 1.3.1
* Revert "Just use kafkacat system package (#481)"
This reverts commit
* switch to multi-stage for kafkacat; bump to 1.3.1
* put apt-clean back (doesn't seem to do much, but leave it there)
-FROM debian:stable
+FROM debian:stretch-slim
+
+WORKDIR /build
+
+ENV VERSION=1.3.1-1
+
+ENV BUILD_PACKAGES="build-essential cmake python git curl zlib1g-dev libsasl2-dev libssl-dev"
+
+RUN echo "Building kafkacat ....." \
+ && apt-get update -y \
+ && DEBIAN_FRONTEND=noninteractive apt-get install -y $BUILD_PACKAGES \
+ && git clone https://github.com/edenhill/kafkacat \
+ && cd kafkacat \
+ && git checkout tags/debian/$VERSION \
+ && ./bootstrap.sh \
+ && make
+
+###
+
+FROM debian:stretch-slim
ARG COMMIT_ID=unknown
LABEL io.confluent.docker.git.id=$COMMIT_ID
@@ -6,9 +25,9 @@ ARG BUILD_NUMBER=-1
LABEL io.confluent.docker.build.number=$BUILD_NUMBER
LABEL io.confluent.docker=true
-RUN echo "Building kafkacat ....." \
- && apt-get update -y \
- && DEBIAN_FRONTEND=noninteractive apt-get install -y kafkacat \
+COPY --from=0 /build/kafkacat/kafkacat /usr/local/bin/
+
+RUN apt-get update -y \
&& echo "Installing runtime dependencies for SSL and SASL support ...." \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y \
openssl \
