<commit_before>FROM gliderlabs/alpine:3.4

MAINTAINER blacktop, https://github.com/blacktop

ENV BRO_VERSION v2.5

COPY patches /tmp
RUN apk-install zlib openssl libstdc++ libpcap geoip libgcc tini
RUN apk-install -t .build-deps linux-headers \
                                openssl-dev \
                                libpcap-dev \
                                python-dev \
                                geoip-dev \
                                zlib-dev \
                                binutils \
                                fts-dev \
                                cmake \
                                clang \
                                bison \
                                perl \
                                make \
                                flex \
                                git \
                                g++ \
                                fts \
  && set -x \
  && cd /tmp \
  && git clone --recursive --branch $BRO_VERSION git://git.bro.org/bro \
  && echo "===> Applying patches..." \
  && cd /tmp/bro \
  && patch -p1 < /tmp/bro-musl.patch \
  && cp /tmp/FindFTS.cmake cmake \
  && cd /tmp/bro/aux/binpac \
  && patch -p1 < /tmp/binpac-musl.patch \
  && echo "===> Compiling bro..." \
  && cd /tmp/bro \
  && CC=clang ./configure --disable-broker \
                          --disable-broctl --disable-broccoli \
                          --disable-auxtools --prefix=/usr/local \
  && make \
  && make install \
  && echo "===> Compiling af_packet plugin..." \
  && cd /tmp/bro/aux/plugins/af_packet \
  && make distclean \
  && CC=clang ./configure --with-kernel=/usr \
  && make \
  && make install \
  && echo "===> Compiling elasticsearch plugin..." \
  && sed -i "s/JSON::TS_MILLIS/JSON::TS_ISO8601/g" /tmp/bro/aux/plugins/elasticsearch/src/ElasticSearch.cc \
  && sed -i "s/127.0.0.1/elasticsearch/g" /tmp/bro/aux/plugins/elasticsearch/scripts/init.bro \
  && sed -i "s/2secs/60secs/g" /tmp/bro/aux/plugins/elasticsearch/scripts/init.bro \  
  && cd /tmp/bro/aux/plugins/elasticsearch \
  && CC=clang ./configure \
  && make \
  && make install \
  && echo "===> Shrinking image..." \
  && strip -s /usr/local/bin/bro \
  && rm -rf /tmp/* \<commit_msg>fix Dockerfile elastic a libcurl<commit_after>FROM gliderlabs/alpine:3.4

MAINTAINER blacktop, https://github.com/blacktop

ENV BRO_VERSION v2.5

COPY patches /tmp
RUN apk-install zlib openssl libstdc++ libpcap geoip libgcc tini
RUN apk-install -t .build-deps linux-headers \
                                openssl-dev \
                                libpcap-dev \
                                python-dev \
                                geoip-dev \
                                zlib-dev \
                                binutils \
                                fts-dev \
                                libcurl \
                                cmake \
                                clang \
                                bison \
                                perl \
                                make \
                                flex \
                                git \
                                g++ \
                                fts \
  && set -x \
  && cd /tmp \
  && git clone --recursive --branch $BRO_VERSION git://git.bro.org/bro \
  && echo "===> Applying patches..." \
  && cd /tmp/bro \
  && patch -p1 < /tmp/bro-musl.patch \
  && cp /tmp/FindFTS.cmake cmake \
  && cd /tmp/bro/aux/binpac \
  && patch -p1 < /tmp/binpac-musl.patch \
  && echo "===> Compiling bro..." \
  && cd /tmp/bro \
  && CC=clang ./configure --disable-broker \
                          --disable-broctl --disable-broccoli \
                          --disable-auxtools --prefix=/usr/local \
  && make \
  && make install \
  && echo "===> Compiling af_packet plugin..." \
  && cd /tmp/bro/aux/plugins/af_packet \
  && make distclean \
  && CC=clang ./configure --with-kernel=/usr \
  && make \
  && make install \
  && echo "===> Compiling elasticsearch plugin..." \
  && sed -i "s/JSON::TS_MILLIS/JSON::TS_ISO8601/g" /tmp/bro/aux/plugins/elasticsearch/src/ElasticSearch.cc \
  && sed -i "s/127.0.0.1/elasticsearch/g" /tmp/bro/aux/plugins/elasticsearch/scripts/init.bro \
  && sed -i "s/2secs/60secs/g" /tmp/bro/aux/plugins/elasticsearch/scripts/init.bro \
  && cd /tmp/bro/aux/plugins/elasticsearch \
  && CC=clang ./configure \
  && make \
  && make install \
  && echo "===> Shrinking image..." \
  && strip -s /usr/local/bin/bro \
  && rm -rf /tmp/* \
{'fraction_non_alphanumeric': 0.14336519226494776, 'fraction_numerical': 0.008446321404756613, 'mean_word_length': 1.1126760563380282, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 13, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '5479261', 'n_tokens_mistral': 1439, 'n_tokens_neox': 1364, 'n_words': 261}