From 0fd3374d5373792bcd7fa807bc9fc785b89d647b Mon Sep 17 00:00:00 2001 From: Dave Dalcino Date: Sat, 2 Apr 2022 18:15:02 -0700 Subject: [PATCH] Fix CMake installation process per https://apt.kitware.com/ Related to: https://github.com/cpp-best-practices/cpp_starter_project/issues/210 --- Dockerfile | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 29df200..47e9289 100644 --- a/Dockerfile +++ b/Dockerfile @@ -63,12 +63,15 @@ RUN update-alternatives --install /usr/bin/clang clang $(which clang-${LLVM_VER} RUN update-alternatives --install /usr/bin/clang++ clang++ $(which clang++-${LLVM_VER}) 100 # Add current cmake/ccmake, from Kitware -ARG CMAKE_URL="https://apt.kitware.com/ubuntu/" -ARG CMAKE_PKG=${VARIANT} +ENV KEYRING_FILE="/usr/share/keyrings/kitware-archive-keyring.gpg" RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null \ - | gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null && \ - apt-add-repository -y "deb ${CMAKE_URL} ${CMAKE_PKG} main" && \ - apt-get update -qq && export DEBIAN_FRONTEND=noninteractive && \ + | gpg --dearmor - | tee "${KEYRING_FILE}" >/dev/null && \ + echo 'deb [signed-by=${KEYRING_FILE}] https://apt.kitware.com/ubuntu/ ${VARIANT} main' \ + | tee /etc/apt/sources.list.d/kitware.list >/dev/null && \ + apt-get update && \ + rm "${KEYRING_FILE}" && \ + apt-get install kitware-archive-keyring && \ + export DEBIAN_FRONTEND=noninteractive && \ apt-get install -y --no-install-recommends cmake cmake-curses-gui # Install editors