<commit_before>FROM java:7
MAINTAINER <NAME> <<EMAIL>>

ENV LEIN_VERSION=2.5.1
ENV LEIN_INSTALL=/home/leinuser/bin

RUN adduser --disabled-password --gecos "" leinuser
RUN mkdir -p $LEIN_INSTALL

WORKDIR /tmp

# Download the whole repo as an archive
RUN wget --quiet https://github.com/technomancy/leiningen/archive/$LEIN_VERSION.tar.gz
RUN echo "Comparing archive checksum ..."
RUN echo "4f6e2e189be0a163f400c3a8060896285fe731f7 *$LEIN_VERSION.tar.gz" | sha1sum -c -
RUN tar -xzf $LEIN_VERSION.tar.gz

# Set to use the lein-pkg script
RUN cp leiningen-$LEIN_VERSION/bin/lein-pkg $LEIN_INSTALL/lein
RUN chmod 0755 $LEIN_INSTALL/lein

# Download and verify Lein stand-alone jar
RUN wget --quiet https://github.com/technomancy/leiningen/releases/download/$LEIN_VERSION/leiningen-$LEIN_VERSION-standalone.zip
RUN wget --quiet https://github.com/technomancy/leiningen/releases/download/$LEIN_VERSION/leiningen-$LEIN_VERSION-standalone.zip.asc

RUN gpg --keyserver pool.sks-keyservers.net --recv-keys \
	296F37E451F91ED1783E402792893DA43FC33005
RUN echo "Verifying Jar file signature ..."
RUN gpg --verify leiningen-$LEIN_VERSION-standalone.zip.asc

# Put the jar where lein script expects
RUN cp leiningen-$LEIN_VERSION-standalone.zip /usr/share/java/leiningen-$LEIN_VERSION-standalone.jar

USER leinuser
WORKDIR /home/leinuser
ENV PATH $PATH:$LEIN_INSTALL

RUN lein<commit_msg>combine RUNs to reduce number of layers to 18<commit_after>FROM java:7
MAINTAINER <NAME> <<EMAIL>>

ENV LEIN_VERSION=2.5.1
ENV LEIN_INSTALL=/home/leinuser/bin

WORKDIR /tmp

# Add a non-root user
RUN adduser --disabled-password --gecos "" leinuser \
	&& mkdir -p $LEIN_INSTALL \

# Download the whole repo as an archive
	&& wget --quiet https://github.com/technomancy/leiningen/archive/$LEIN_VERSION.tar.gz \
	&& echo "Comparing archive checksum ..." \
	&& echo "4f6e2e189be0a163f400c3a8060896285fe731f7 *$LEIN_VERSION.tar.gz" | sha1sum -c - \
	&& tar -xzf $LEIN_VERSION.tar.gz \

# Set to use the lein-pkg script
	&& cp leiningen-$LEIN_VERSION/bin/lein-pkg $LEIN_INSTALL/lein \
	&& chmod 0755 $LEIN_INSTALL/lein \

# Download and verify Lein stand-alone jar
	&& wget --quiet https://github.com/technomancy/leiningen/releases/download/$LEIN_VERSION/leiningen-$LEIN_VERSION-standalone.zip \
	&& wget --quiet https://github.com/technomancy/leiningen/releases/download/$LEIN_VERSION/leiningen-$LEIN_VERSION-standalone.zip.asc \

	&& gpg --keyserver pool.sks-keyservers.net --recv-keys \
		296F37E451F91ED1783E402792893DA43FC33005 \
	&& echo "Verifying Jar file signature ..." \
	&& gpg --verify leiningen-$LEIN_VERSION-standalone.zip.asc \

# Put the jar where lein script expects
	&& cp leiningen-$LEIN_VERSION-standalone.zip /usr/share/java/leiningen-$LEIN_VERSION-standalone.jar

USER leinuser
WORKDIR /home/leinuser
ENV PATH=$PATH:$LEIN_INSTALL

RUN lein
{'fraction_non_alphanumeric': 0.11806291975963237, 'fraction_numerical': 0.048073524213503006, 'mean_word_length': 4.505836575875486, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1289526', 'n_tokens_mistral': 1147, 'n_tokens_neox': 1029, 'n_words': 217}