<commit_before>FROM alpine:3.3
MAINTAINER <NAME> <EMAIL>

ENV \
    MAVEN_HOME="/usr/share/maven" \
    JAVA_HOME="/usr/lib/jvm/default-jvm" \
    ZK_RELEASE="http://www.apache.org/dist/zookeeper/zookeeper-3.4.6/zookeeper-3.4.6.tar.gz" \
    EXHIBITOR_POM="https://raw.githubusercontent.com/Netflix/exhibitor/d911a16d704bbe790d84bbacc655ef050c1f5806/exhibitor-standalone/src/main/resources/buildscripts/standalone/maven/pom.xml" \
    BUILD_DEPS="curl openjdk8 bash tar"

ENV PATH=${JAVA_HOME}/bin:${PATH}

RUN \
    # Install Java8
    apk add --update ${BUILD_DEPS} \

    # Default DNS cache TTL is -1. DNS records, like, change, man
    && grep '^networkaddress.cache.ttl=' ${JAVA_HOME}/jre/lib/security/java.security || echo 'networkaddress.cache.ttl=60' >> ${JAVA_HOME}/jre/lib/security/java.security \

    # Cleanup
    && rm -rf -- /var/cache/apk/* \

    # Install Maven
    && MAVEN_VERSION=3.3.3 \
    && cd /usr/share \
    && wget -q http://archive.apache.org/dist/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz -O - | tar xzf - \
    && mv /usr/share/apache-maven-$MAVEN_VERSION /usr/share/maven \
    && ln -s /usr/share/maven/bin/mvn /usr/bin/mvn

RUN \
    mkdir -p /opt \

    # Install ZK
    && curl -Lo /tmp/zookeeper.tgz $ZK_RELEASE \
    && mkdir -p /opt/zookeeper/transactions /opt/zookeeper/snapshots \
    && tar -xzf /tmp/zookeeper.tgz -C /opt/zookeeper --strip-components=1 \
    && rm /tmp/zookeeper.tgz \

    # Install Exhibitor
    && mkdir -p /opt/exhibitor \
    && curl -Lo /opt/exhibitor/pom.xml $EXHIBITOR_POM \
    && mvn -f /opt/exhibitor/pom.xml package \
    && ln -s /opt/exhibitor/target/exhibitor*jar /opt/exhibitor/exhibitor.jar

# Add the wrapper script to setup configs and exec exhibitor
ADD include/wrapper.sh /opt/exhibitor/wrapper.sh

# Add the optional web.xml for authentication
ADD include/web.xml /opt/exhibitor/web.xml

USER root
WORKDIR /opt/exhibitor
EXPOSE 2181 2888 3888 8181

ENTRYPOINT ["bash", "-ex", "/opt/exhibitor/wrapper.sh"]<commit_msg>Improves image security<commit_after>FROM alpine:3.3
MAINTAINER <NAME> <EMAIL>

ENV \
    MAVEN_HOME="/usr/share/maven" \
    JAVA_HOME="/usr/lib/jvm/default-jvm" \
    JAVA_PREFS="/.java/.userPrefs" \
    ZK_HOME="/opt/zookeeper" \
    EXBT_HOME="/opt/exhibitor" \
    ZK_RELEASE="http://www.apache.org/dist/zookeeper/zookeeper-3.4.6/zookeeper-3.4.6.tar.gz" \
    EXHIBITOR_POM="https://raw.githubusercontent.com/Netflix/exhibitor/d911a16d704bbe790d84bbacc655ef050c1f5806/exhibitor-standalone/src/main/resources/buildscripts/standalone/maven/pom.xml" \
    BUILD_DEPS="curl openjdk8 bash tar"

ENV PATH=${JAVA_HOME}/bin:${PATH}

RUN \
    # Install Java8
    apk add --update ${BUILD_DEPS} \

    # Default DNS cache TTL is -1. DNS records, like, change, man
    && grep '^networkaddress.cache.ttl=' ${JAVA_HOME}/jre/lib/security/java.security || echo 'networkaddress.cache.ttl=60' >> ${JAVA_HOME}/jre/lib/security/java.security \

    # Cleanup
    && rm -rf -- /var/cache/apk/* \

    # Install Maven
    && MAVEN_VERSION=3.3.3 \
    && cd /usr/share \
    && wget -q http://archive.apache.org/dist/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz -O - | tar xzf - \
    && mv /usr/share/apache-maven-${MAVEN_VERSION} /usr/share/maven \
    && ln -s /usr/share/maven/bin/mvn /usr/bin/mvn

RUN \
    mkdir -p /opt \

    # Install ZK
    && curl -Lo /tmp/zookeeper.tgz ${ZK_RELEASE} \
    && mkdir -p ${ZK_HOME}/transactions ${ZK_HOME}/snapshots \
    && tar -xzf /tmp/zookeeper.tgz -C ${ZK_HOME} --strip-components=1 \
    && rm /tmp/zookeeper.tgz \

    # Install Exhibitor
    && mkdir -p ${EXBT_HOME} \
    && curl -Lo ${EXBT_HOME}/pom.xml ${EXHIBITOR_POM} \
    && mvn -f ${EXBT_HOME}/pom.xml package \
    && ln -s ${EXBT_HOME}/target/exhibitor*jar ${EXBT_HOME}/exhibitor.jar \
    && chown -R nobody.nobody ${ZK_HOME} ${EXBT_HOME}

# Add the wrapper script to setup configs and exec exhibitor
ADD include/wrapper.sh ${EXBT_HOME}/wrapper.sh

# Add the optional web.xml for authentication
ADD include/web.xml ${EXBT_HOME}/web.xml

# To store Java preferences
RUN mkdir -p ${JAVA_PREFS}
RUN chown -R nobody.nobody ${JAVA_PREFS}

USER nobody
WORKDIR /opt/exhibitor
EXPOSE 2181 2888 3888 8181

ENTRYPOINT ["bash", "-ex", "/opt/exhibitor/wrapper.sh"]
{'fraction_non_alphanumeric': 0.15949074074074074, 'fraction_numerical': 0.026851851851851852, 'mean_word_length': 3.06109022556391, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 12}, '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': '4276248', 'n_tokens_mistral': 1822, 'n_tokens_neox': 1679, 'n_words': 294}