Commit f7aaf4c4 authored by Ingo Meyer's avatar Ingo Meyer

Pin the `clang-format` version to `9`

Pin the `clang-format` version to `9` to be compatible with the macOS
`/usr/local`. Use `update-alternatives` to set `clang-format-9` as the
default `clang-format` binary.
parent 1c8c8b77
Pipeline #20743 passed with stage
in 27 minutes and 30 seconds
FROM debian:sid
LABEL maintainer="Ingo Heimbach <i.heimbach@fz-juelich.de>"
ARG CLANG_FORMAT_VERSION="8"
ARG CLANG_FORMAT_VERSION="9"
ARG CMAKE_FORMAT_VERSION="0.6.7"
RUN apt-get update && \
apt-get install -y --no-install-recommends "clang-format-${CLANG_FORMAT_VERSION}" file git python3-pip \
python3-setuptools python3-wheel && \
update-alternatives --install "/usr/bin/clang-format" \
"clang-format" \
"/usr/bin/clang-format-${CLANG_FORMAT_VERSION}" \
1 && \
python3 -m pip install "cmake_format==${CMAKE_FORMAT_VERSION}" && \
rm -rf /var/lib/apt/lists/* && \
ln -s /usr/bin/clang-format-${CLANG_FORMAT_VERSION} /usr/local/bin/clang-format
rm -rf /var/lib/apt/lists/*
CMD ["/bin/bash"]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment