Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kafka 0.11.0.0 #4

Closed
wants to merge 17 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions kafka-prometheus-jmx-exporter/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM openjdk:8u131-jre-alpine

ENV EXPORTER_VERSION=8ded2c5e112f8c458e60398c528799ca763c78ac

RUN set -e; cd /usr/local; \
MAVEN_VERSION=3.5.0 PATH=$PATH:$(pwd)/maven/bin; \
apk add --no-cache --virtual .build-deps \
curl \
openjdk8="$JAVA_ALPINE_VERSION"; \
mkdir ./maven; \
curl -SLs https://archive.apache.org/dist/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz | tar -xzf - --strip-components=1 -C ./maven; \
mvn --version; \
\
mkdir ./jmx_exporter; \
curl -SLs https://github.com/prometheus/jmx_exporter/archive/$EXPORTER_VERSION.tar.gz | tar -xzf - --strip-components=1 -C ./jmx_exporter; \
cd ./jmx_exporter; \
mvn package; \
\
rm /root/.m2 -Rf; \
apk del .build-deps;

RUN apk add --no-cache bash

WORKDIR /usr/local/jmx_exporter
ENTRYPOINT ["run_sample_httpserver.sh"]
54 changes: 45 additions & 9 deletions kafka/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,52 @@
FROM openjdk:8-jre-alpine
FROM openjdk:8u131-jre-alpine

ARG kafka_version=0.10.2.0
ENV kafka_bin_version=2.12-$kafka_version
ENV KAFKA_VERSION=0.11.0.0 SCALA_VERSION=2.12.2

RUN apk add --no-cache --update-cache --virtual build-dependencies curl ca-certificates \
&& mkdir -p /opt/kafka \
&& curl -SLs "https://www-eu.apache.org/dist/kafka/$kafka_version/kafka_$kafka_bin_version.tgz" | tar -xzf - --strip-components=1 -C /opt/kafka \
&& apk del build-dependencies \
&& rm -rf /var/cache/apk/*
RUN set -e; cd /usr/local; \
GRADLE_VERSION=4.0 PATH=$PATH:$(pwd)/gradle-$GRADLE_VERSION/bin; \
apk add --no-cache --virtual .build-deps \
curl \
openjdk8="$JAVA_ALPINE_VERSION"; \
curl -SLs -o gradle-$GRADLE_VERSION-bin.zip https://services.gradle.org/distributions/gradle-$GRADLE_VERSION-bin.zip; \
unzip gradle-$GRADLE_VERSION-bin.zip; \
rm gradle-$GRADLE_VERSION-bin.zip; \
gradle -v; \
\
mkdir build; \
curl -SLs "https://github.com/apache/kafka/archive/$KAFKA_VERSION.tar.gz" | tar -xzf - --strip-components=1 -C ./build; \
cd build; \
sed -i "s/scalaVersion=.*/scalaVersion=$SCALA_VERSION/" gradle.properties; \
gradle; \
#./gradlew unitTest; \
#./gradlew integrationTest; \
./gradlew jar; \
gradle --stop; \
cd ..; \
\
rm gradle-$GRADLE_VERSION -Rf; \
rm ~/.gradle -Rf; \
apk del .build-deps; \
\
mkdir -p kafka/core/build kafka/clients/build; \
mv build/core/build/libs kafka/core/build/; \
mv build/core/build/dependant-libs-* kafka/core/build/; \
mv build/clients/build/libs kafka/clients/build/; \
mv build/config kafka/; \
mv build/bin kafka/; \
rm kafka/bin/windows -Rf; \
rm build -Rf

WORKDIR /opt/kafka
RUN apk add --no-cache bash

WORKDIR /usr/local/kafka
ENTRYPOINT ["bin/kafka-server-start.sh"]

RUN sed -i 's/zookeeper.connect=localhost:2181/zookeeper.connect=zookeeper:2181/' config/server.properties
CMD ["config/server.properties"]

RUN set -e; \
mv config/log4j.properties config/log4j.properties.org; \
echo "log4j.rootLogger=INFO, stdout" > config/log4j.properties; \
echo "log4j.appender.stdout=org.apache.log4j.ConsoleAppender" >> config/log4j.properties; \
echo "log4j.appender.stdout.layout=org.apache.log4j.PatternLayout" >> config/log4j.properties; \
echo "log4j.appender.stdout.layout.ConversionPattern=[%d] %p %m (%c)%n" >> config/log4j.properties