Public | Automated Build

Last pushed: a year ago
# Builds an image for Apache Kafka from binary distribution. # # The netflixoss/java base image runs Oracle Java 8 installed atop the # ubuntu:trusty (14.04) official image. Docker's official java images are # OpenJDK-only currently, and the Kafka project, Confluent, and most other # major Java projects test and recommend Oracle Java for production for optimal # performance. FROM netflixoss/java:8 MAINTAINER Ches Martin <> # The Scala 2.12 build is currently recommended by the project. ENV KAFKA_VERSION= KAFKA_SCALA_VERSION=2.12 JMX_PORT=7203 ENV KAFKA_RELEASE_ARCHIVE kafka_${KAFKA_SCALA_VERSION}-${KAFKA_VERSION}.tgz RUN mkdir /kafka /data /logs RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get install -y \ ca-certificates # Download Kafka binary distribution ADD${KAFKA_VERSION}/${KAFKA_RELEASE_ARCHIVE} /tmp/ ADD${KAFKA_VERSION}/${KAFKA_RELEASE_ARCHIVE}.md5 /tmp/ WORKDIR /tmp # Check artifact digest integrity RUN echo VERIFY CHECKSUM: && \ gpg --print-md MD5 ${KAFKA_RELEASE_ARCHIVE} 2>/dev/null && \ cat ${KAFKA_RELEASE_ARCHIVE}.md5 # Install Kafka to /kafka RUN tar -zx -C /kafka --strip-components=1 -f ${KAFKA_RELEASE_ARCHIVE} && \ rm -rf kafka_* ADD config /kafka/config ADD / # Set up a user to run Kafka RUN groupadd kafka && \ useradd -d /kafka -g kafka -s /bin/false kafka && \ chown -R kafka:kafka /kafka /data /logs USER kafka ENV PATH /kafka/bin:$PATH WORKDIR /kafka # broker, jmx EXPOSE 9092 ${JMX_PORT} VOLUME [ "/data", "/logs" ] CMD ["/"]
Source Repository