diff --git a/scripts/docker/Dockerfile.clang.full b/scripts/docker/Dockerfile.clang.full index 417225bcec60d2190801afcd5168f75dca244e98..ea6ed90e84240b0f9b84c6a742c847e95aeff4c7 100644 --- a/scripts/docker/Dockerfile.clang.full +++ b/scripts/docker/Dockerfile.clang.full @@ -1,78 +1,111 @@ -FROM ubuntu:16.04 +FROM ubuntu:17.10 -RUN apt-get update && apt-get install -y software-properties-common curl \ - && add-apt-repository -y ppa:ubuntu-toolchain-r/test \ - && curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash \ - && apt-get update \ - && apt-get -y install \ - build-essential \ - ccache \ - clang-3.9 \ - git git-lfs \ - python-pip \ - sudo \ - unzip \ - xz-utils +# Generated with https://github.com/ufz/ogs-container-maker/commit/0930f12 -RUN python -m pip install --upgrade pip \ - && python -m pip install cmake conan>=1.10.0 +RUN apt-get update -y && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + wget \ + tar \ + curl && \ + rm -rf /var/lib/apt/lists/* -# Ninja -RUN curl -L -o ninja-linux.zip https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-linux.zip \ - && unzip ninja-linux.zip \ - && mv ninja /usr/local/bin/ninja \ - && rm ninja-linux.zip +# LLVM compiler +RUN apt-get update -y && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + clang-5.0 && \ + rm -rf /var/lib/apt/lists/* +RUN update-alternatives --install /usr/bin/clang clang $(which clang-5.0) 30 && \ + update-alternatives --install /usr/bin/clang++ clang++ $(which clang++-5.0) 30 -ENV CC=clang-3.9 -ENV CXX=clang++-3.9 +RUN apt-get update -y && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + clang-tidy-5.0 && \ + rm -rf /var/lib/apt/lists/* -# Add user jenkins to the image -RUN adduser --uid 500 --disabled-password --gecos "" jenkins \ - # Add user jenkins to sudoers with NOPASSWD - && echo "jenkins ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers \ - # Set password for the jenkins user (you may want to alter this). - && echo "jenkins:jenkins" | chpasswd +# OGS base building block +# Python +RUN apt-get update -y && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + python3 \ + libpython3-dev && \ + rm -rf /var/lib/apt/lists/* +# pip +RUN apt-get update -y && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + python3-pip \ + python3-setuptools \ + python3-wheel && \ + rm -rf /var/lib/apt/lists/* +RUN pip3 install --upgrade pip +# CMake version 3.13.4 +RUN apt-get update -y && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + wget && \ + rm -rf /var/lib/apt/lists/* +RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://cmake.org/files/v3.13/cmake-3.13.4-Linux-x86_64.sh && \ + /bin/sh /var/tmp/cmake-3.13.4-Linux-x86_64.sh --prefix=/usr/local --skip-license && \ + rm -rf /var/tmp/cmake-3.13.4-Linux-x86_64.sh +RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash +RUN apt-get update -y && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends software-properties-common && \ + apt-add-repository ppa:git-core/ppa -y && \ + apt-get update -y && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + git \ + git-lfs \ + make \ + ninja-build && \ + rm -rf /var/lib/apt/lists/* +RUN git lfs install && \ + mkdir -p /apps /scratch /lustre /work /projects -USER jenkins -ENV CCACHE_DIR=/home/jenkins/cache/ccache -RUN mkdir -p $CCACHE_DIR -ENV CCACHE_MAXSIZE=15G -ENV CCACHE_SLOPPINESS=pch_defines,time_macros -ENV CONAN_USER_HOME=/home/jenkins/cache/conan -WORKDIR /home/jenkins -RUN conan user - -### END clang.minimal ### -USER root +# Package manager Conan building block +# pip +RUN apt-get update -y && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + python3-pip \ + python3-setuptools \ + python3-wheel && \ + rm -rf /var/lib/apt/lists/* +RUN pip3 install conan==1.12.2 +RUN mkdir -p /opt/conan && \ + chmod 777 /opt/conan +ENV CONAN_USER_HOME=/opt/conan +LABEL org.opengeosys.pm=conan \ + org.opengeosys.pm.conan.user_home=/opt/conan \ + org.opengeosys.pm.conan.version=1.12.2 -RUN apt-get update \ - && apt-get -y install apt-transport-https curl \ - && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ - && echo "deb https://dl.yarnpkg.com/debian/ stable main" \ - | tee /etc/apt/sources.list.d/yarn.list \ - && curl -s https://deb.nodesource.com/setup_8.x | bash \ - && apt-get update && apt-get install -y \ - biber \ - clang-tidy-3.9 \ - cppcheck \ - doxygen \ - graphviz \ - libxml2-utils \ - nodejs \ - pandoc-citeproc \ - yarn +# Include-what-you-use for clang version 5.0 +RUN apt-get update -y && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + libncurses5-dev \ + zlib1g-dev \ + llvm-5.0-dev \ + libclang-5.0-dev && \ + rm -rf /var/lib/apt/lists/* +RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://github.com/include-what-you-use/include-what-you-use/archive/clang_5.0.tar.gz && \ + mkdir -p /var/tmp && tar -x -f /var/tmp/clang_5.0.tar.gz -C /var/tmp -z && \ + mkdir -p /var/tmp/build && cd /var/tmp/build && cmake -DCMAKE_INSTALL_PREFIX=/usr/local/iwyy -DIWYU_LLVM_ROOT_PATH=/usr/lib/llvm-5.0 /var/tmp/include-what-you-use-clang_5.0 && \ + cmake --build /var/tmp/build --target install -- -j$(nproc) && \ + rm -rf /var/tmp/clang_5.0.tar.gz /var/tmp/build /var/tmp/include-what-you-use-clang_5.0 +ENV PATH=/usr/local/iwyy/bin:$PATH -RUN update-alternatives --install /usr/bin/node node /usr/bin/nodejs 10 - -# Hugo -RUN curl -L -o hugo.tar.gz https://github.com/gohugoio/hugo/releases/download/v0.32.3/hugo_0.32.3_Linux-64bit.tar.gz \ - && tar xf hugo.tar.gz \ - && mv hugo /usr/local/bin/hugo \ - && rm -rf hugo.tar.gz LICENSE.md README.md - -# Include-what-you-use -RUN curl https://include-what-you-use.org/downloads/include-what-you-use-0.8-x86_64-linux-gnu-ubuntu-16.04.tar.gz -O \ - && tar xf include-what-you-use-0.8-x86_64-linux-gnu-ubuntu-16.04.tar.gz -C /usr/ --strip-components=1 \ - && rm include-what-you-use-0.8-x86_64-linux-gnu-ubuntu-16.04.tar.gz +# Package manager Conan building block +RUN apt-get update -y && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ccache && \ + rm -rf /var/lib/apt/lists/* +RUN mkdir -p /opt/cache && chmod 777 /opt/cache +ENV CCACHE_DIR=/opt/cache \ + CCACHE_MAXSIZE=15G \ + CCACHE_SLOPPINESS=pch_defines,time_macros +LABEL ccache.dir=/opt/cache \ + ccache.size=15G +# Jenkins node +RUN groupadd --gid 1001 jenkins && \ + adduser --uid 500 --gid 1001 --disabled-password --gecos "" jenkins && \ + echo "jenkins ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers && \ + echo "jenkins:jenkins" | chpasswd USER jenkins +WORKDIR /home/jenkins diff --git a/scripts/docker/Dockerfile.clang.minimal b/scripts/docker/Dockerfile.clang.minimal index b6664aebc9873393afb6bb6f3dd87da00f7695a2..82f4eb825da0af3f3fb3d80d3ad65c80aeafc933 100644 --- a/scripts/docker/Dockerfile.clang.minimal +++ b/scripts/docker/Dockerfile.clang.minimal @@ -1,43 +1,96 @@ -FROM ubuntu:16.04 - -RUN apt-get update && apt-get install -y software-properties-common curl \ - && add-apt-repository -y ppa:ubuntu-toolchain-r/test \ - && curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash \ - && apt-get update \ - && apt-get -y install \ - build-essential \ - ccache \ - clang-3.9 \ - git git-lfs \ - python-pip \ - sudo \ - unzip \ - xz-utils - -RUN python -m pip install --upgrade pip \ - && python -m pip install cmake conan>=1.10.0 - -# Ninja -RUN curl -L -o ninja-linux.zip https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-linux.zip \ - && unzip ninja-linux.zip \ - && mv ninja /usr/local/bin/ninja \ - && rm ninja-linux.zip - -ENV CC=clang-3.9 -ENV CXX=clang++-3.9 - -# Add user jenkins to the image -RUN adduser --uid 500 --disabled-password --gecos "" jenkins \ - # Add user jenkins to sudoers with NOPASSWD - && echo "jenkins ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers \ - # Set password for the jenkins user (you may want to alter this). - && echo "jenkins:jenkins" | chpasswd +FROM ubuntu:17.10 +# Generated with https://github.com/ufz/ogs-container-maker/commit/0930f12 + +RUN apt-get update -y && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + wget \ + tar \ + curl && \ + rm -rf /var/lib/apt/lists/* + +# LLVM compiler +RUN apt-get update -y && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + clang-5.0 && \ + rm -rf /var/lib/apt/lists/* +RUN update-alternatives --install /usr/bin/clang clang $(which clang-5.0) 30 && \ + update-alternatives --install /usr/bin/clang++ clang++ $(which clang++-5.0) 30 + +RUN apt-get update -y && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + clang-tidy-5.0 && \ + rm -rf /var/lib/apt/lists/* + +# OGS base building block +# Python +RUN apt-get update -y && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + python3 \ + libpython3-dev && \ + rm -rf /var/lib/apt/lists/* +# pip +RUN apt-get update -y && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + python3-pip \ + python3-setuptools \ + python3-wheel && \ + rm -rf /var/lib/apt/lists/* +RUN pip3 install --upgrade pip +# CMake version 3.13.4 +RUN apt-get update -y && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + wget && \ + rm -rf /var/lib/apt/lists/* +RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://cmake.org/files/v3.13/cmake-3.13.4-Linux-x86_64.sh && \ + /bin/sh /var/tmp/cmake-3.13.4-Linux-x86_64.sh --prefix=/usr/local --skip-license && \ + rm -rf /var/tmp/cmake-3.13.4-Linux-x86_64.sh +RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash +RUN apt-get update -y && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends software-properties-common && \ + apt-add-repository ppa:git-core/ppa -y && \ + apt-get update -y && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + git \ + git-lfs \ + make \ + ninja-build && \ + rm -rf /var/lib/apt/lists/* +RUN git lfs install && \ + mkdir -p /apps /scratch /lustre /work /projects + +# Package manager Conan building block +# pip +RUN apt-get update -y && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + python3-pip \ + python3-setuptools \ + python3-wheel && \ + rm -rf /var/lib/apt/lists/* +RUN pip3 install conan==1.12.2 +RUN mkdir -p /opt/conan && \ + chmod 777 /opt/conan +ENV CONAN_USER_HOME=/opt/conan +LABEL org.opengeosys.pm=conan \ + org.opengeosys.pm.conan.user_home=/opt/conan \ + org.opengeosys.pm.conan.version=1.12.2 + +# Package manager Conan building block +RUN apt-get update -y && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ccache && \ + rm -rf /var/lib/apt/lists/* +RUN mkdir -p /opt/cache && chmod 777 /opt/cache +ENV CCACHE_DIR=/opt/cache \ + CCACHE_MAXSIZE=15G \ + CCACHE_SLOPPINESS=pch_defines,time_macros +LABEL ccache.dir=/opt/cache \ + ccache.size=15G + +# Jenkins node +RUN groupadd --gid 1001 jenkins && \ + adduser --uid 500 --gid 1001 --disabled-password --gecos "" jenkins && \ + echo "jenkins ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers && \ + echo "jenkins:jenkins" | chpasswd USER jenkins -ENV CCACHE_DIR=/home/jenkins/cache/ccache -RUN mkdir -p $CCACHE_DIR -ENV CCACHE_MAXSIZE=15G -ENV CCACHE_SLOPPINESS=pch_defines,time_macros -ENV CONAN_USER_HOME=/home/jenkins/cache/conan WORKDIR /home/jenkins -RUN conan user diff --git a/scripts/docker/Dockerfile.gcc.full b/scripts/docker/Dockerfile.gcc.full index 6bd6b13aa2e105662f17cdb2eb8a255976643b1b..9f0bc50aaac2d60e52027cd014a2ff974741f34e 100644 --- a/scripts/docker/Dockerfile.gcc.full +++ b/scripts/docker/Dockerfile.gcc.full @@ -1,6 +1,6 @@ FROM ubuntu:17.10 -# Generated with https://github.com/ufz/ogs-container-maker/commit/c3dc13e +# Generated with https://github.com/ufz/ogs-container-maker/commit/0930f12 RUN apt-get update -y && \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ @@ -95,17 +95,13 @@ RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https:// rm -rf /var/tmp/1.83.tar.gz /var/tmp/build /var/tmp/cppcheck-1.83 ENV PATH=/usr/local/cppcheck/bin:$PATH -# Package manager Conan building block RUN apt-get update -y && \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - ccache && \ + doxygen \ + graphviz \ + texlive-base \ + sudo && \ rm -rf /var/lib/apt/lists/* -RUN mkdir -p /opt/cache && chmod 777 /opt/cache -ENV CCACHE_DIR=/opt/cache \ - CCACHE_MAXSIZE=15G \ - CCACHE_SLOPPINESS=pch_defines,time_macros -LABEL ccache.dir=/opt/cache \ - ccache.size=15G # pip RUN apt-get update -y && \ @@ -116,13 +112,17 @@ RUN apt-get update -y && \ rm -rf /var/lib/apt/lists/* RUN pip3 install gcovr +# Package manager Conan building block RUN apt-get update -y && \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - doxygen \ - graphviz \ - texlive-base \ - sudo && \ + ccache && \ rm -rf /var/lib/apt/lists/* +RUN mkdir -p /opt/cache && chmod 777 /opt/cache +ENV CCACHE_DIR=/opt/cache \ + CCACHE_MAXSIZE=15G \ + CCACHE_SLOPPINESS=pch_defines,time_macros +LABEL ccache.dir=/opt/cache \ + ccache.size=15G # Jenkins node RUN groupadd --gid 1001 jenkins && \ diff --git a/scripts/docker/Dockerfile.gcc.gui b/scripts/docker/Dockerfile.gcc.gui index 87c1ff0c016661342008333bee92154467c34e78..486b6b5dc92e41423aa62a3fa2fbf8730fb3fe79 100644 --- a/scripts/docker/Dockerfile.gcc.gui +++ b/scripts/docker/Dockerfile.gcc.gui @@ -1,6 +1,6 @@ FROM ubuntu:17.10 -# Generated with https://github.com/ufz/ogs-container-maker/commit/c3dc13e +# Generated with https://github.com/ufz/ogs-container-maker/commit/0930f12 RUN apt-get update -y && \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ @@ -96,23 +96,6 @@ ENV CCACHE_DIR=/opt/cache \ LABEL ccache.dir=/opt/cache \ ccache.size=15G -# pip -RUN apt-get update -y && \ - DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - python3-pip \ - python3-setuptools \ - python3-wheel && \ - rm -rf /var/lib/apt/lists/* -RUN pip3 install gcovr - -RUN apt-get update -y && \ - DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - doxygen \ - graphviz \ - texlive-base \ - sudo && \ - rm -rf /var/lib/apt/lists/* - # Jenkins node RUN groupadd --gid 1001 jenkins && \ adduser --uid 500 --gid 1001 --disabled-password --gecos "" jenkins && \