<commit_before>FROM alpine:3.8

RUN apk update \
    && apk add --no-cache \
        build-base \
        cmake \
        git \
        file \
        curl \
        yaml-cpp-dev \
        bison

# Google Test
ENV GTEST_ROOT=/opt/gtest
ARG GTEST_VER=4e4df226fc197c0dda6e37f5c8c3845ca1e73a49
RUN mkdir -p ${GTEST_ROOT} \
    && cd /tmp \
    && curl -o gtest.tar.gz \
      -L https://github.com/google/googletest/archive/${GTEST_VER}.tar.gz \
    && tar -zxvf gtest.tar.gz --strip-components=1 -C ${GTEST_ROOT} \
    && rm gtest.tar.gz

# YAEP
RUN cd /tmp \
    && git clone --depth 1 https://github.com/sanssecours/yaep.git \
    && cd yaep \
    && env CXXFLAGS='-fPIC' ./configure \
    && make -C src install

# Create User:Group
# The id is important as jenkins docker agents use the same id that is running
# on the slaves to execute containers
ARG JENKINS_USERID
RUN adduser \
    -u ${JENKINS_USERID} \
    -D \
    jenkins
USER ${JENKINS_USERID}

RUN git config --global user.email 'Jenkins <<EMAIL>>' \
    && git config --global user.name 'Jenkins'<commit_msg>Docker: Remove temporary data from Alpine image<commit_after>FROM alpine:3.8

RUN apk update \
    && apk add --no-cache \
        build-base \
        cmake \
        git \
        file \
        curl \
        yaml-cpp-dev \
        bison

# Google Test
ENV GTEST_ROOT=/opt/gtest
ARG GTEST_VER=4e4df226fc197c0dda6e37f5c8c3845ca1e73a49
RUN mkdir -p ${GTEST_ROOT} \
    && cd /tmp \
    && curl -o gtest.tar.gz \
      -L https://github.com/google/googletest/archive/${GTEST_VER}.tar.gz \
    && tar -zxvf gtest.tar.gz --strip-components=1 -C ${GTEST_ROOT} \
    && rm gtest.tar.gz

# YAEP
RUN cd /tmp \
    && git clone --depth 1 https://github.com/sanssecours/yaep.git \
    && cd yaep \
    && env CXXFLAGS='-fPIC' ./configure \
    && make -C src install \
    && cd .. \
    && rm -r yaep

# Create User:Group
# The id is important as jenkins docker agents use the same id that is running
# on the slaves to execute containers
ARG JENKINS_USERID
RUN adduser \
    -u ${JENKINS_USERID} \
    -D \
    jenkins
USER ${JENKINS_USERID}

RUN git config --global user.email 'Jenkins <<EMAIL>>' \
    && git config --global user.name 'Jenkins'
{'fraction_non_alphanumeric': 0.12754409769335143, 'fraction_numerical': 0.024423337856173677, 'mean_word_length': 2.191919191919192, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '654192', 'n_tokens_mistral': 860, 'n_tokens_neox': 824, 'n_words': 215}