From ac470dec11789c7480f1ff04376a06715bc23b0b Mon Sep 17 00:00:00 2001
From: Lars Bilke <lars.bilke@ufz.de>
Date: Fri, 28 Feb 2020 15:42:33 +0100
Subject: [PATCH] Updated Dockerfiles.

---
 ThirdParty/container-maker           |  2 +-
 scripts/docker/Dockerfile.clang.full | 61 ++++++++++++++++------------
 scripts/docker/Dockerfile.gcc.full   | 33 ++++++++++-----
 scripts/docker/Dockerfile.gcc.gui    | 33 ++++++++++-----
 4 files changed, 81 insertions(+), 48 deletions(-)

diff --git a/ThirdParty/container-maker b/ThirdParty/container-maker
index a0f52106b7a..151e6d47c27 160000
--- a/ThirdParty/container-maker
+++ b/ThirdParty/container-maker
@@ -1 +1 @@
-Subproject commit a0f52106b7a095bc32fc1bef7d6af6cd1bd4943a
+Subproject commit 151e6d47c27ea637aad99165ba0558d244cbdd35
diff --git a/scripts/docker/Dockerfile.clang.full b/scripts/docker/Dockerfile.clang.full
index 1cb27dfee65..6bf918e8989 100644
--- a/scripts/docker/Dockerfile.clang.full
+++ b/scripts/docker/Dockerfile.clang.full
@@ -1,3 +1,5 @@
+# syntax=docker/dockerfile:experimental
+
 FROM ubuntu:18.04 AS build
 
 # Generated with ogs-container-maker 1.2.0
@@ -13,16 +15,25 @@ RUN apt-get update -y && \
 # LLVM compiler
 RUN apt-get update -y && \
     DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
-        clang-8 && \
+        clang-9 && \
+    rm -rf /var/lib/apt/lists/*
+RUN update-alternatives --install /usr/bin/clang clang $(which clang-9) 30 && \
+    update-alternatives --install /usr/bin/clang++ clang++ $(which clang++-9) 30
+
+RUN apt-get update -y && \
+    DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
+        clang-format-9 \
+        clang-tidy-9 && \
     rm -rf /var/lib/apt/lists/*
-RUN update-alternatives --install /usr/bin/clang clang $(which clang-8) 30 && \
-    update-alternatives --install /usr/bin/clang++ clang++ $(which clang++-8) 30
 
+# pip
 RUN apt-get update -y && \
     DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
-        clang-format-8 \
-        clang-tidy-8 && \
+        python3-pip \
+        python3-setuptools \
+        python3-wheel && \
     rm -rf /var/lib/apt/lists/*
+RUN pip3 install scif
 
 # OGS base building block
 # Python
@@ -55,16 +66,16 @@ RUN apt-get update && \
     git lfs install && \
     mkdir -p /apps /scratch /lustre /work /projects /data
 
-# CMake version 3.12.4
+# CMake version 3.14.7
 RUN apt-get update -y && \
     DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
         make \
         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.12/cmake-3.12.4-Linux-x86_64.sh && \
+RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://cmake.org/files/v3.14/cmake-3.14.7-Linux-x86_64.sh && \
     mkdir -p /usr/local && \
-    /bin/sh /var/tmp/cmake-3.12.4-Linux-x86_64.sh --prefix=/usr/local --skip-license && \
-    rm -rf /var/tmp/cmake-3.12.4-Linux-x86_64.sh
+    /bin/sh /var/tmp/cmake-3.14.7-Linux-x86_64.sh --prefix=/usr/local --skip-license && \
+    rm -rf /var/tmp/cmake-3.14.7-Linux-x86_64.sh
 ENV PATH=/usr/local/bin:$PATH
 
 # Package manager Conan building block
@@ -84,41 +95,41 @@ RUN apt-get update -y && \
         python3-setuptools \
         python3-wheel && \
     rm -rf /var/lib/apt/lists/*
-RUN pip3 install conan==1.21.0
+RUN pip3 install conan==1.22.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.version=1.21.0
+    org.opengeosys.pm.conan.version=1.22.2
 LABEL org.opengeosys.pm.conan.user_home=/opt/conan
 
-# Include-what-you-use for clang version 8
+# Include-what-you-use for clang version 9
 RUN apt-get update -y && \
     DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
-        libclang-8-dev \
+        libclang-9-dev \
         libncurses5-dev \
-        llvm-8-dev \
+        llvm-9-dev \
         zlib1g-dev && \
     rm -rf /var/lib/apt/lists/*
-# https://github.com/include-what-you-use/include-what-you-use/archive/clang_8.0.tar.gz
-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_8.0.tar.gz && \
-    mkdir -p /var/tmp && tar -x -f /var/tmp/clang_8.0.tar.gz -C /var/tmp -z && \
-    mkdir -p /var/tmp/include-what-you-use-clang_8.0/build && cd /var/tmp/include-what-you-use-clang_8.0/build && cmake -DCMAKE_INSTALL_PREFIX=/usr/local/iwyy -D IWYU_LLVM_ROOT_PATH=/usr/lib/llvm-8 /var/tmp/include-what-you-use-clang_8.0 && \
-    cmake --build /var/tmp/include-what-you-use-clang_8.0/build --target all -- -j$(nproc) && \
-    cmake --build /var/tmp/include-what-you-use-clang_8.0/build --target install -- -j$(nproc) && \
-    rm -rf /var/tmp/include-what-you-use-clang_8.0 /var/tmp/clang_8.0.tar.gz
+# https://github.com/include-what-you-use/include-what-you-use/archive/clang_9.0.tar.gz
+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_9.0.tar.gz && \
+    mkdir -p /var/tmp && tar -x -f /var/tmp/clang_9.0.tar.gz -C /var/tmp -z && \
+    mkdir -p /var/tmp/include-what-you-use-clang_9.0/build && cd /var/tmp/include-what-you-use-clang_9.0/build && cmake -DCMAKE_INSTALL_PREFIX=/usr/local/iwyy -D IWYU_LLVM_ROOT_PATH=/usr/lib/llvm-9 /var/tmp/include-what-you-use-clang_9.0 && \
+    cmake --build /var/tmp/include-what-you-use-clang_9.0/build --target all -- -j$(nproc) && \
+    cmake --build /var/tmp/include-what-you-use-clang_9.0/build --target install -- -j$(nproc) && \
+    rm -rf /var/tmp/include-what-you-use-clang_9.0 /var/tmp/clang_9.0.tar.gz
 ENV PATH=/usr/local/iwyy/bin:$PATH
 
-# Package manager Conan building block
+# ccache 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 \
+RUN mkdir -p /opt/ccache && chmod 777 /opt/ccache
+ENV CCACHE_DIR=/opt/ccache \
     CCACHE_MAXSIZE=15G \
     CCACHE_SLOPPINESS=pch_defines,time_macros
-LABEL ccache.dir=/opt/cache \
+LABEL ccache.dir=/opt/ccache \
     ccache.size=15G
 
 # Jenkins node
diff --git a/scripts/docker/Dockerfile.gcc.full b/scripts/docker/Dockerfile.gcc.full
index f2f099e27f5..6dd63f23eef 100644
--- a/scripts/docker/Dockerfile.gcc.full
+++ b/scripts/docker/Dockerfile.gcc.full
@@ -1,4 +1,6 @@
-FROM ubuntu:18.04 AS build
+# syntax=docker/dockerfile:experimental
+
+FROM ubuntu:19.04 AS build
 
 # Generated with ogs-container-maker 1.2.0
 
@@ -17,6 +19,15 @@ RUN apt-get update -y && \
         gcc && \
     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 scif
+
 # OGS base building block
 # Python
 RUN apt-get update -y && \
@@ -48,16 +59,16 @@ RUN apt-get update && \
     git lfs install && \
     mkdir -p /apps /scratch /lustre /work /projects /data
 
-# CMake version 3.12.4
+# CMake version 3.14.7
 RUN apt-get update -y && \
     DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
         make \
         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.12/cmake-3.12.4-Linux-x86_64.sh && \
+RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://cmake.org/files/v3.14/cmake-3.14.7-Linux-x86_64.sh && \
     mkdir -p /usr/local && \
-    /bin/sh /var/tmp/cmake-3.12.4-Linux-x86_64.sh --prefix=/usr/local --skip-license && \
-    rm -rf /var/tmp/cmake-3.12.4-Linux-x86_64.sh
+    /bin/sh /var/tmp/cmake-3.14.7-Linux-x86_64.sh --prefix=/usr/local --skip-license && \
+    rm -rf /var/tmp/cmake-3.14.7-Linux-x86_64.sh
 ENV PATH=/usr/local/bin:$PATH
 
 # Package manager Conan building block
@@ -77,12 +88,12 @@ RUN apt-get update -y && \
         python3-setuptools \
         python3-wheel && \
     rm -rf /var/lib/apt/lists/*
-RUN pip3 install conan==1.21.0
+RUN pip3 install conan==1.22.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.version=1.21.0
+    org.opengeosys.pm.conan.version=1.22.2
 LABEL org.opengeosys.pm.conan.user_home=/opt/conan
 
 # cppcheck version 1.87
@@ -111,16 +122,16 @@ RUN apt-get update -y && \
     rm -rf /var/lib/apt/lists/*
 RUN pip3 install gcovr
 
-# Package manager Conan building block
+# ccache 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 \
+RUN mkdir -p /opt/ccache && chmod 777 /opt/ccache
+ENV CCACHE_DIR=/opt/ccache \
     CCACHE_MAXSIZE=15G \
     CCACHE_SLOPPINESS=pch_defines,time_macros
-LABEL ccache.dir=/opt/cache \
+LABEL ccache.dir=/opt/ccache \
     ccache.size=15G
 
 # Jenkins node
diff --git a/scripts/docker/Dockerfile.gcc.gui b/scripts/docker/Dockerfile.gcc.gui
index 182f040303f..7e5b089000b 100644
--- a/scripts/docker/Dockerfile.gcc.gui
+++ b/scripts/docker/Dockerfile.gcc.gui
@@ -1,4 +1,6 @@
-FROM ubuntu:18.04 AS build
+# syntax=docker/dockerfile:experimental
+
+FROM ubuntu:19.04 AS build
 
 # Generated with ogs-container-maker 1.2.0
 
@@ -17,6 +19,15 @@ RUN apt-get update -y && \
         gcc && \
     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 scif
+
 # OGS base building block
 # Python
 RUN apt-get update -y && \
@@ -56,16 +67,16 @@ RUN apt-get update -y && \
         mesa-common-dev && \
     rm -rf /var/lib/apt/lists/*
 
-# CMake version 3.12.4
+# CMake version 3.14.7
 RUN apt-get update -y && \
     DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
         make \
         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.12/cmake-3.12.4-Linux-x86_64.sh && \
+RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://cmake.org/files/v3.14/cmake-3.14.7-Linux-x86_64.sh && \
     mkdir -p /usr/local && \
-    /bin/sh /var/tmp/cmake-3.12.4-Linux-x86_64.sh --prefix=/usr/local --skip-license && \
-    rm -rf /var/tmp/cmake-3.12.4-Linux-x86_64.sh
+    /bin/sh /var/tmp/cmake-3.14.7-Linux-x86_64.sh --prefix=/usr/local --skip-license && \
+    rm -rf /var/tmp/cmake-3.14.7-Linux-x86_64.sh
 ENV PATH=/usr/local/bin:$PATH
 
 # Package manager Conan building block
@@ -85,12 +96,12 @@ RUN apt-get update -y && \
         python3-setuptools \
         python3-wheel && \
     rm -rf /var/lib/apt/lists/*
-RUN pip3 install conan==1.21.0
+RUN pip3 install conan==1.22.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.version=1.21.0
+    org.opengeosys.pm.conan.version=1.22.2
 LABEL org.opengeosys.pm.conan.user_home=/opt/conan
 
 # cppcheck version 1.87
@@ -112,16 +123,16 @@ RUN apt-get update -y && \
     rm -rf /var/lib/apt/lists/*
 RUN pip3 install gcovr
 
-# Package manager Conan building block
+# ccache 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 \
+RUN mkdir -p /opt/ccache && chmod 777 /opt/ccache
+ENV CCACHE_DIR=/opt/ccache \
     CCACHE_MAXSIZE=15G \
     CCACHE_SLOPPINESS=pch_defines,time_macros
-LABEL ccache.dir=/opt/cache \
+LABEL ccache.dir=/opt/ccache \
     ccache.size=15G
 
 # Jenkins node
-- 
GitLab