<commit_before>FROM ubuntu:focal

ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get -y install \
        automake \
        autotools-dev \
        build-essential \
        bison \
        clang \
        cmake \
        curl \
        debhelper \
        default-jdk \
        devscripts \
        dh-exec \
        dh-lua \
        dh-python \
        discount \
        doxygen \
        flex \
        git \
        git-buildpackage \
        graphviz \
        ghostscript \
        libaugeas-dev \
        libboost-dev \
        libcurl4-gnutls-dev \
        libdbus-1-dev \
        libgit2-dev \
        libgpgme-dev \
        libqt5svg5-dev \
        liblua5.2-dev \
        libmarkdown2-dev \
        libssl-dev \
        libsystemd-dev \
        libxerces-c-dev \
        libxml2-dev \
        libyajl-dev \
        libzmq3-dev \
        lintian \
        locales \
        maven \
        pkg-config \
        python-all \
        python-dev \
        python3-all \
        python3-dev \
        ninja-build \
        qtbase5-dev \
        qtdeclarative5-dev \
        ruby-dev \
        rustc \
        valgrind \
        libpcre3 \
        libpcre3-dev \
    && rm -rf /var/lib/apt/lists/*

RUN wget https://downloads.sourceforge.net/swig/swig-4.0.2.tar.gz && \
    tar -xvzf swig-4.0.2.tar.gz && \
    cd swig-4.0.2 && \
    ./configure --prefix=/usr \
                --without-maximum-compile-warnings && \
    make && \
    make install && \
    install -v -m755 -d /usr/share/doc/swig-4.0.2 && \
    cp -v -R Doc/* /usr/share/doc/swig-4.0.2

# Google Test
ENV GTEST_ROOT=/opt/gtest
ARG GTEST_VER=release-1.10.0
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

# Update cache for shared libraries
RUN ldconfig

# Create User:Group
# The id is important as jenkins docker agents use the same id that is running
# on the slaves to execute containers

RUN ln -s /usr/bin/swig /usr/bin/swig3.0

ARG JENKINS_GROUPID
RUN groupadd \
    -g ${JENKINS_GROUPID} \
    -f \
    jenkins

ARG JENKINS_USERID
RUN useradd \
    --create-home \
    --uid ${JENKINS_USERID} \
    --gid ${JENKINS_GROUPID} \
    --shell "/bin/bash" \
    jenkins

USER ${JENKINS_USERID}

# Set git config
RUN git config --global user.email 'Jenkins <<EMAIL>>' \
    && git config --global user.name 'Jenkins'

# TODO: remove next line
CMD tail -f /dev/null<commit_msg>dockerfile: remove cmd used for debugging<commit_after>FROM ubuntu:focal

ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get -y install \
        automake \
        autotools-dev \
        build-essential \
        bison \
        clang \
        cmake \
        curl \
        debhelper \
        default-jdk \
        devscripts \
        dh-exec \
        dh-lua \
        dh-python \
        discount \
        doxygen \
        flex \
        git \
        git-buildpackage \
        graphviz \
        ghostscript \
        libaugeas-dev \
        libboost-dev \
        libcurl4-gnutls-dev \
        libdbus-1-dev \
        libgit2-dev \
        libgpgme-dev \
        libqt5svg5-dev \
        liblua5.2-dev \
        libmarkdown2-dev \
        libssl-dev \
        libsystemd-dev \
        libxerces-c-dev \
        libxml2-dev \
        libyajl-dev \
        libzmq3-dev \
        lintian \
        locales \
        maven \
        pkg-config \
        python-all \
        python-dev \
        python3-all \
        python3-dev \
        ninja-build \
        qtbase5-dev \
        qtdeclarative5-dev \
        ruby-dev \
        rustc \
        valgrind \
        libpcre3 \
        libpcre3-dev \
    && rm -rf /var/lib/apt/lists/*

RUN wget https://downloads.sourceforge.net/swig/swig-4.0.2.tar.gz && \
    tar -xvzf swig-4.0.2.tar.gz && \
    cd swig-4.0.2 && \
    ./configure --prefix=/usr \
                --without-maximum-compile-warnings && \
    make && \
    make install && \
    install -v -m755 -d /usr/share/doc/swig-4.0.2 && \
    cp -v -R Doc/* /usr/share/doc/swig-4.0.2

# Google Test
ENV GTEST_ROOT=/opt/gtest
ARG GTEST_VER=release-1.10.0
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

# Update cache for shared libraries
RUN ldconfig

# Create User:Group
# The id is important as jenkins docker agents use the same id that is running
# on the slaves to execute containers

RUN ln -s /usr/bin/swig /usr/bin/swig3.0

ARG JENKINS_GROUPID
RUN groupadd \
    -g ${JENKINS_GROUPID} \
    -f \
    jenkins

ARG JENKINS_USERID
RUN useradd \
    --create-home \
    --uid ${JENKINS_USERID} \
    --gid ${JENKINS_GROUPID} \
    --shell "/bin/bash" \
    jenkins

USER ${JENKINS_USERID}

# Set git config
RUN git config --global user.email 'Jenkins <<EMAIL>>' \
    && git config --global user.name 'Jenkins'
{'fraction_non_alphanumeric': 0.12025068546807677, 'fraction_numerical': 0.016059537798668234, 'mean_word_length': 1.4635793535938253, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5145472', 'n_tokens_mistral': 1897, 'n_tokens_neox': 1836, 'n_words': 382}