From 09a71c941333f7f76007c6786c1c8028d0ab0732 Mon Sep 17 00:00:00 2001
From: Nicolas Pope <nwpope@utu.fi>
Date: Fri, 13 Aug 2021 11:30:31 +0100
Subject: [PATCH] Use new docker base image

---
 docker/CI/container-script.sh | 4 ++--
 docker/CI/pipeline-script.sh  | 2 +-
 docker/base/Dockerfile        | 7 ++++++-
 docker/devel/Dockerfile       | 2 +-
 4 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/docker/CI/container-script.sh b/docker/CI/container-script.sh
index 61d46ee14..d3fb305f6 100755
--- a/docker/CI/container-script.sh
+++ b/docker/CI/container-script.sh
@@ -3,6 +3,6 @@
 cd /opt/ftl
 mkdir build
 cd build
-cmake .. -DCMAKE_CXX_FLAGS="-fdiagnostics-color" -DWITH_OPTFLOW=TRUE -DUSE_CPPCHECK=FALSE -DBUILD_CALIBRATION=TRUE -DWITH_CERES=TRUE -DCMAKE_BUILD_TYPE=Release -DCPACK_GENERATOR=DEB &&
-make -j4 &&
+cmake .. -GNinja -DCMAKE_CXX_FLAGS="-fdiagnostics-color" -DWITH_OPTFLOW=TRUE -DUSE_CPPCHECK=FALSE -DBUILD_CALIBRATION=TRUE -DWITH_CERES=TRUE -DCMAKE_BUILD_TYPE=Release -DCPACK_GENERATOR=DEB &&
+ninja &&
 ctest --output-on-failure
diff --git a/docker/CI/pipeline-script.sh b/docker/CI/pipeline-script.sh
index 1fe21694e..11125248c 100755
--- a/docker/CI/pipeline-script.sh
+++ b/docker/CI/pipeline-script.sh
@@ -7,6 +7,6 @@ docker run \
     -e NVIDIA_DRIVER_CAPABILITIES=graphics,compute,utility,video \
     -v "${PWD}:/opt/ftl" \
     -u $(id -u ${USER}):$(id -g ${USER}) \
-    ftlab/base:1.0-dev \
+    ftlab/base:1.1-dev \
     /opt/ftl/docker/CI/container-script.sh
     
\ No newline at end of file
diff --git a/docker/base/Dockerfile b/docker/base/Dockerfile
index 9f4775d8b..59d4da302 100644
--- a/docker/base/Dockerfile
+++ b/docker/base/Dockerfile
@@ -9,7 +9,7 @@ RUN apt-get update &&\
     # Install build tools, build dependencies and python
     apt-get install --no-install-recommends -y \
         build-essential \
-        cmake \
+        ninja-build \
         git \
         openssh-client \
         wget \
@@ -51,6 +51,11 @@ RUN apt-get update &&\
 COPY ./libnvcuvid.so ./libnvidia-encode.so /usr/lib/x86_64-linux-gnu/
 
 RUN cd /opt/ &&\
+    # CMake
+    wget https://github.com/Kitware/CMake/releases/download/v3.20.5/cmake-3.20.5-linux-x86_64.sh && \
+    chmod a+x ././cmake-3.20.5-linux-x86_64.sh && \
+    ./cmake-3.20.5-linux-x86_64.sh --skip-license --prefix=/usr/local && \
+    rm ./cmake-3.20.5-linux-x86_64.sh && \
     # Pylon
     wget -O pylon.deb https://seafile.utu.fi/f/b4585f6c84f0462fac04/?dl=1 &&\
     apt-get install ./pylon.deb &&\
diff --git a/docker/devel/Dockerfile b/docker/devel/Dockerfile
index 3e8f44702..9ead9074d 100644
--- a/docker/devel/Dockerfile
+++ b/docker/devel/Dockerfile
@@ -1,4 +1,4 @@
-FROM ftlab/base:1.0-dev
+FROM ftlab/base:1.1-dev
 
 ARG USER_ID
 ARG GROUP_ID
-- 
GitLab