Skip to content

Instantly share code, notes, and snippets.

@ghulands
Created July 2, 2017 05:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ghulands/42e9d2d5c0e8025f15f74081fa053884 to your computer and use it in GitHub Desktop.
Save ghulands/42e9d2d5c0e8025f15f74081fa053884 to your computer and use it in GitHub Desktop.
FROM frolvlad/alpine-oraclejdk8
ARG MESOS_VERSION=1.2.0
# Update and Install Prerequisites
RUN apk add --update --no-cache \
ca-certificates curl bash gzip git alpine-sdk \
autoconf automake libtool linux-headers libstdc++ \
zlib-dev fts-dev apr-dev curl-dev libxml2-dev libxslt-dev cyrus-sasl-dev cyrus-sasl-crammd5 subversion-dev \
&& ln -s /usr/include/locale.h /usr/include/xlocale.h \
&& ln -s /usr/include/libxml2/libxml /usr/include/libxml \
&& curl --progress-bar -o /tmp/mesos-${MESOS_VERSION}.tar.gz http://archive.apache.org/dist/mesos/${MESOS_VERSION}/mesos-${MESOS_VERSION}.tar.gz \
&& tar -xz -f /tmp/mesos-${MESOS_VERSION}.tar.gz -C /tmp \
&& cd /tmp/mesos-${MESOS_VERSION}/ \
&& ./bootstrap \
&& mkdir -p build \
&& cd build \
&& ../configure --disable-python \
&& make -j 8 \
&& make install \
&& git clone https://github.com/mesos/kafka.git /mesos-kafka \
&& cd /mesos-kafka \
&& git checkout master \
&& ./gradlew jar downloadKafka \
&& rm -rf /tmp/mesos-${MESOS_VERSION} \
&& rm -rf /root/.gradle \
&& apk del autoconf automake libtool linux-headers alpine-sdk
EXPOSE 7000
ENV MESOS_NATIVE_JAVA_LIBRARY=/usr/local/lib/libmesos.so
WORKDIR "/mesos-kafka"
ENTRYPOINT ["/mesos-kafka/kafka-mesos.sh"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment