<commit_before>#
# Dockerfile for Storm Mesos framework
#
FROM ubuntu:14.04
MAINTAINER <NAME> <<EMAIL>>

# Add mesosphere, openjdk 8 repo
# install jdk 7 and 8
RUN DISTRO=$(lsb_release -is | tr '[:upper:]' '[:lower:]') && \
	CODENAME=$(lsb_release -cs) && \
	echo "deb http://repos.mesosphere.com/${DISTRO} ${CODENAME} main" > /etc/apt/sources.list.d/mesosphere.list && \
	apt-key adv --keyserver keyserver.ubuntu.com --recv E56151BF && \
	apt-get -y install software-properties-common && \
	add-apt-repository ppa:openjdk-r/ppa && \
	apt-get -y update && \
	apt-get -y install openjdk-7-jdk openjdk-8-jdk && \
	apt-get -yf autoremove && \
	apt-get clean

# set JAVA_HOME depending if JAVA_PRODUCT_VERSION is set
ARG JAVA_PRODUCT_VERSION=''
ENV TARGET_JAVA_HOME ${JAVA_PRODUCT_VERSION:+/usr/lib/jvm/java-$JAVA_PRODUCT_VERSION-openjdk-amd64}
ENV JAVA_HOME ${TARGET_JAVA_HOME:-/usr/lib/jvm/java-7-openjdk-amd64}
ENV JAVA_PRODUCT_VERSION ${JAVA_PRODUCT_VERSION:-7}

# install mesos version, build arg, MESOS_RELEASE with a default value
ARG MESOS_RELEASE=0.28.0
RUN update-alternatives --install /usr/bin/java java ${JAVA_HOME%*/}/bin/java 20000 && \
	update-alternatives --install /usr/bin/javac javac ${JAVA_HOME%*/}/bin/javac 20000 && \
	apt-get -y install mesos=`apt-cache madison mesos | grep ${MESOS_RELEASE} | head -1 | awk '{print $3}'` && \
	apt-get clean

# set build arg STORM_RELEASE, MIRROR with defaults values
ARG STORM_RELEASE=0.10.0
ARG MIRROR=''
ARG STORM_URL=''
ARG RELEASE=''

# set runtime environment variables
ENV MESOS_RELEASE ${MESOS_RELEASE:-0.28.0}
ENV STORM_RELEASE ${STORM_RELEASE:-0.10.0}
ENV DEBIAN_FRONTEND ${DEBIAN_FRONTEND:-noninteractive}
ENV MESOS_NATIVE_JAVA_LIBRARY ${MESOS_NATIVE_JAVA_LIBRARY:-/usr/lib/libmesos.so}

# Add files for storm-mesos package building
ADD . /tmp

# storm-mesos package building if file storm-mesos*.tgz not found
RUN cd /tmp && \
	RELEASE=`grep -1 -A 0 -B 0 '<version>' pom.xml | head -n 1 | awk '{print $1}' | sed -e 's/.*<version>//' | sed -e 's/<\/version>.*//'` && \
	([ -f storm-mesos-${RELEASE}-storm${STORM_RELEASE}-mesos${MESOS_RELEASE}.tgz ] || \
		(apt-get -y install maven wget curl && \
			STORM_RELEASE=$STORM_RELEASE MESOS_RELEASE=$MESOS_RELEASE ./bin/build-release.sh main && \
			apt-get -yf autoremove maven \<commit_msg>Cleanup docker image<commit_after>#
# Dockerfile for Storm Mesos framework
#
FROM ubuntu:14.04
MAINTAINER <NAME> <<EMAIL>>

# set JAVA_HOME depending if JAVA_PRODUCT_VERSION is set
ARG JAVA_PRODUCT_VERSION=''
ENV TARGET_JAVA_HOME ${JAVA_PRODUCT_VERSION:+/usr/lib/jvm/java-$JAVA_PRODUCT_VERSION-openjdk-amd64}
ENV JAVA_HOME ${TARGET_JAVA_HOME:-/usr/lib/jvm/java-7-openjdk-amd64}
ENV JAVA_PRODUCT_VERSION ${JAVA_PRODUCT_VERSION:-7}

# Add mesosphere, openjdk 8 repo
# install jdk 7 and 8
# install mesos version, build arg, MESOS_RELEASE with a default value
ARG MESOS_RELEASE=0.28.0
RUN DISTRO=$(lsb_release -is | tr "[:upper:]" "[:lower:]") && \
	CODENAME=$(lsb_release -cs) && \
	echo "deb http://repos.mesosphere.com/${DISTRO} ${CODENAME} main" > /etc/apt/sources.list.d/mesosphere.list && \
	apt-key adv --keyserver keyserver.ubuntu.com --recv E56151BF && \
	apt-get -y update && \
	apt-get -y install mesos=`apt-cache madison mesos | grep " ${MESOS_RELEASE}" | head -1 | awk '{print $3}'` && \
	apt-get clean && rm -rf /var/lib/apt/lists/*

# set build arg STORM_RELEASE, MIRROR with defaults values
ARG STORM_RELEASE=0.10.0
ARG MIRROR=''
ARG STORM_URL=''
ARG RELEASE=''

# set runtime environment variables
ENV MESOS_RELEASE ${MESOS_RELEASE:-0.28.0}
ENV STORM_RELEASE ${STORM_RELEASE:-0.10.0}
ENV DEBIAN_FRONTEND ${DEBIAN_FRONTEND:-noninteractive}
ENV MESOS_NATIVE_JAVA_LIBRARY ${MESOS_NATIVE_JAVA_LIBRARY:-/usr/lib/libmesos.so}

# Add files for storm-mesos package building
COPY . /tmp

# storm-mesos package building if file storm-mesos*.tgz not found
RUN cd /tmp && \
	RELEASE=`grep -1 -A 0 -B 0 '<version>' pom.xml | head -n 1 | awk '{print $1}' | sed -e 's/.*<version>//' | sed -e 's/<\/version>.*//'` && \
	([ -f storm-mesos-${RELEASE}-storm${STORM_RELEASE}-mesos${MESOS_RELEASE}.tgz ] || \
		(apt-get -y install software-properties-common && \
			add-apt-repository ppa:openjdk-r/ppa && \
			apt-get -y update && \
			apt-get -y install openjdk-${JAVA_PRODUCT_VERSION}-jdk maven wget curl && \
			update-alternatives --install /usr/bin/java java ${JAVA_HOME%/}/bin/java 20000 && \
			update-alternatives --install /usr/bin/javac javac ${JAVA_HOME%/}/bin/javac 20000 && \
			STORM_RELEASE=$STORM_RELEASE MESOS_RELEASE=$MESOS_RELEASE ./bin/build-release.sh main && \
			apt-get -yf autoremove openjdk-${JAVA_PRODUCT_VERSION}-jdk maven \
{'fraction_non_alphanumeric': 0.15515386270712286, 'fraction_numerical': 0.022380030126963633, 'mean_word_length': 4.1875, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6378962', 'n_tokens_mistral': 1966, 'n_tokens_neox': 1768, 'n_words': 409}