Skip to content

Commit

Permalink
Update kafka 10 to newer alpine
Browse files Browse the repository at this point in the history
Motivation - current version doesn't use /etc/resolv.conf which prevents
kubernetes usage with the current image.

See gliderlabs/docker-alpine#8
  • Loading branch information
Yonatan Kiron committed Mar 25, 2018
1 parent ff8f9d3 commit 0b51282
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@ FROM anapsix/alpine-java

MAINTAINER Wurstmeister

RUN apk add --update unzip wget curl docker jq coreutils
RUN echo "http://dl-cdn.alpinelinux.org/alpine/v3.7/main" > /etc/apk/repositories && \
apk update && \
apk add --update unzip wget curl jq coreutils

ENV KAFKA_VERSION="0.10.0.0" SCALA_VERSION="2.11"
ADD download-kafka.sh /tmp/download-kafka.sh
RUN /tmp/download-kafka.sh && tar xfz /tmp/kafka_${SCALA_VERSION}-${KAFKA_VERSION}.tgz -C /opt && rm /tmp/kafka_${SCALA_VERSION}-${KAFKA_VERSION}.tgz
RUN /tmp/download-kafka.sh && \
tar xfz /tmp/kafka_${SCALA_VERSION}-${KAFKA_VERSION}.tgz -C /opt && \
rm /tmp/kafka_${SCALA_VERSION}-${KAFKA_VERSION}.tgz && \
rm -rf /var/cache/apk/*

VOLUME ["/kafka"]

Expand Down
2 changes: 1 addition & 1 deletion download-kafka.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh

mirror=$(curl --stderr /dev/null https://www.apache.org/dyn/closer.cgi\?as_json\=1 | jq -r '.preferred')
mirror="https://archive.apache.org/dist/"
url="${mirror}kafka/${KAFKA_VERSION}/kafka_${SCALA_VERSION}-${KAFKA_VERSION}.tgz"
wget -q "${url}" -O "/tmp/kafka_${SCALA_VERSION}-${KAFKA_VERSION}.tgz"

0 comments on commit 0b51282

Please sign in to comment.