diff --git a/scripts/docker/Dockerfile.pre-commit b/scripts/docker/Dockerfile.pre-commit index f224e98cf2318f2e0db0f55bef1ccf32b683d41f..a3910274e9d382221ebc863efb8d57f363d83e3a 100644 --- a/scripts/docker/Dockerfile.pre-commit +++ b/scripts/docker/Dockerfile.pre-commit @@ -4,7 +4,12 @@ ENV TZ=Europe/Berlin RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone RUN apt-get update \ - && apt-get install -y --no-install-recommends git gcc g++ python3-pip clang-format-12 \ + && apt-get install -y --no-install-recommends git gcc g++ python3-pip wget xz-utils \ && rm -rf /var/lib/apt/lists/* -RUN update-alternatives --install /usr/local/bin/clang-format clang-format /usr/bin/clang-format-12 10 RUN pip install pre-commit==2.13.0 + +ARG clang_version=12.0.1 +RUN wget https://github.com/llvm/llvm-project/releases/download/llvmorg-${clang_version}/clang+llvm-${clang_version}-x86_64-linux-gnu-ubuntu-16.04.tar.xz \ + && tar xf clang+llvm-${clang_version}-x86_64-linux-gnu-ubuntu-16.04.tar.xz \ + && rm clang+llvm-${clang_version}-x86_64-linux-gnu-ubuntu-16.04.tar.xz +ENV PATH="/clang+llvm-${clang_version}-x86_64-linux-gnu-ubuntu-/bin:${PATH}"