From d1ed490477f95c8ee6e308cced5ee63a1789dc82 Mon Sep 17 00:00:00 2001 From: Jan R Date: Sat, 24 Feb 2024 14:09:56 +0100 Subject: [PATCH 1/2] [docker] reduce layers - nitpicking: group some RUN layers that belong together --- .devcontainer/Dockerfile | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index e948180e..596a3139 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -38,8 +38,8 @@ RUN add-apt-repository -y ppa:ubuntu-toolchain-r/test && \ gcc-${GCC_VER} g++-${GCC_VER} gdb # Set gcc-${GCC_VER} as default gcc -RUN update-alternatives --install /usr/bin/gcc gcc $(which gcc-${GCC_VER}) 100 -RUN update-alternatives --install /usr/bin/g++ g++ $(which g++-${GCC_VER}) 100 +RUN update-alternatives --install /usr/bin/gcc gcc $(which gcc-${GCC_VER}) 100 \ + && update-alternatives --install /usr/bin/g++ g++ $(which g++-${GCC_VER}) 100 ARG LLVM_VER="13" # Add clang-${LLVM_VER} @@ -53,11 +53,10 @@ RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - 2>/dev/ llvm-${LLVM_VER}-dev libclang-${LLVM_VER}-dev clang-tidy-${LLVM_VER} # Set the default clang-tidy, so CMake can find it -RUN update-alternatives --install /usr/bin/clang-tidy clang-tidy $(which clang-tidy-${LLVM_VER}) 1 - +RUN update-alternatives --install /usr/bin/clang-tidy clang-tidy $(which clang-tidy-${LLVM_VER}) 1 \ # Set clang-${LLVM_VER} as default clang -RUN update-alternatives --install /usr/bin/clang clang $(which clang-${LLVM_VER}) 100 -RUN update-alternatives --install /usr/bin/clang++ clang++ $(which clang++-${LLVM_VER}) 100 + && update-alternatives --install /usr/bin/clang clang $(which clang-${LLVM_VER}) 100 \ + && 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/" From 2d911a4c695298fc39e18d41d91030a2998ee54c Mon Sep 17 00:00:00 2001 From: Jan R Date: Sat, 24 Feb 2024 14:11:51 +0100 Subject: [PATCH 2/2] [docker] add clang-format - add clang-format to the dockerfile --- .devcontainer/Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 596a3139..7750ac8c 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -50,10 +50,12 @@ RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - 2>/dev/ apt-get update -qq && export DEBIAN_FRONTEND=noninteractive && \ apt-get install -y --no-install-recommends \ clang-${LLVM_VER} lldb-${LLVM_VER} lld-${LLVM_VER} clangd-${LLVM_VER} \ - llvm-${LLVM_VER}-dev libclang-${LLVM_VER}-dev clang-tidy-${LLVM_VER} + llvm-${LLVM_VER}-dev libclang-${LLVM_VER}-dev clang-tidy-${LLVM_VER} clang-format-${LLVM_VER} # Set the default clang-tidy, so CMake can find it RUN update-alternatives --install /usr/bin/clang-tidy clang-tidy $(which clang-tidy-${LLVM_VER}) 1 \ +# Set the default clang-format, so CMake can find it + && update-alternatives --install /usr/bin/clang-format clang-format $(which clang-format-${LLVM_VER}) 1 \ # Set clang-${LLVM_VER} as default clang && update-alternatives --install /usr/bin/clang clang $(which clang-${LLVM_VER}) 100 \ && update-alternatives --install /usr/bin/clang++ clang++ $(which clang++-${LLVM_VER}) 100