<commit_before>FROM ubuntu:bionic

# install the required dependencies to compile AzerothCore
RUN apt update && apt install -y git cmake make gcc g++ clang libmysqlclient-dev libssl-dev libbz2-dev libreadline-dev libncurses-dev libace-6.* libace-dev

# copy the sources from the host machine to the Docker container
ADD .git /azerothcore/.git
ADD deps /azerothcore/deps
ADD conf/config.cmake.dist /azerothcore/conf/config.cmake.dist
ADD src /azerothcore/src
ADD modules /azerothcore/modules
ADD CMakeLists.txt /azerothcore/CMakeLists.txt

ARG ENABLE_SCRIPTS=1
ENV ENABLE_SCRIPTS=$ENABLE_SCRIPTS

ENTRYPOINT  cd azerothcore/build && \
            # run cmake
            cmake ../ -DCMAKE_INSTALL_PREFIX=/azeroth-server -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DTOOLS=0 -DSCRIPTS=$ENABLE_SCRIPTS && \
            # calculate the optimal number of threads
            MTHREADS=`grep -c ^processor /proc/cpuinfo`; MTHREADS=$(($MTHREADS + 2)) && \
            # run compilation
            make -j $MTHREADS && \
            make install -j $MTHREADS && \
            # copy the binary files "authserver" and "worldserver" files back to the host
            # - the directories "/binworldserver" and "/binauthserver" are meant to be bound to the host directories
            # - see docker/build/README.md to view the bindings
            cp /azeroth-server/bin/worldserver /binworldserver && \
            cp /azeroth-server/bin/authserver /binauthserver<commit_msg>feat(Docker): Enable warnings during build (#2395)<commit_after>FROM ubuntu:bionic

# install the required dependencies to compile AzerothCore
RUN apt update && apt install -y git cmake make gcc g++ clang libmysqlclient-dev libssl-dev libbz2-dev libreadline-dev libncurses-dev libace-6.* libace-dev

# copy the sources from the host machine to the Docker container
ADD .git /azerothcore/.git
ADD deps /azerothcore/deps
ADD conf/config.cmake.dist /azerothcore/conf/config.cmake.dist
ADD src /azerothcore/src
ADD modules /azerothcore/modules
ADD CMakeLists.txt /azerothcore/CMakeLists.txt

ARG ENABLE_SCRIPTS=1
ENV ENABLE_SCRIPTS=$ENABLE_SCRIPTS

ENTRYPOINT  cd azerothcore/build && \
            # run cmake
            cmake ../ -DCMAKE_INSTALL_PREFIX=/azeroth-server -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DTOOLS=0 -DSCRIPTS=$ENABLE_SCRIPTS -DWITH_WARNINGS=1 -DCMAKE_C_FLAGS="-Werror" -DCMAKE_CXX_FLAGS="-Werror" && \
            # calculate the optimal number of threads
            MTHREADS=`grep -c ^processor /proc/cpuinfo`; MTHREADS=$(($MTHREADS + 2)) && \
            # run compilation
            make -j $MTHREADS && \
            make install -j $MTHREADS && \
            # copy the binary files "authserver" and "worldserver" files back to the host
            # - the directories "/binworldserver" and "/binauthserver" are meant to be bound to the host directories
            # - see docker/build/README.md to view the bindings
            cp /azeroth-server/bin/worldserver /binworldserver && \
            cp /azeroth-server/bin/authserver /binauthserver
{'fraction_non_alphanumeric': 0.09551468215553405, 'fraction_numerical': 0.00484027105517909, 'mean_word_length': 3.005167958656331, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '3792014', 'n_tokens_mistral': 1021, 'n_tokens_neox': 965, 'n_words': 269}