The CMake build tool with the Clang/LLVM toolchain.
1.4K
CMake build system with the Clang/LLVM compiler toolchain (clang, clang++, lld, the LLVM tools and clang-tools), plus Make and Ninja.
This image packages CMake releases from https://github.com/Kitware/CMake/releases on Ubuntu 26.04, with Clang 21.1 from the Ubuntu archive.
Image source: https://github.com/boxcutter/oci/tree/main/cmake/clang
| Tag | Contents |
|---|---|
latest, 4.4, 4.4.5 | CMake 4.4.5 with Clang 21.1 on Ubuntu 26.04 |
Mount your source tree on /src, the default working directory, and run
cmake to configure and build it:
docker run -it --rm \
--user "$(id -u):$(id -g)" \
--mount type=bind,source="$(pwd)",target=/src \
docker.io/boxcutter/cmake-clang \
bash -c "cmake -S . -B build && cmake --build build"
The build output goes to build/ in your source tree. Passing --user keeps
the files owned by you instead of root.
To use Ninja instead of Make, pass -G Ninja when configuring, or set
CMAKE_GENERATOR=Ninja:
docker run -it --rm \
--user "$(id -u):$(id -g)" \
--mount type=bind,source="$(pwd)",target=/src \
--env CMAKE_GENERATOR=Ninja \
docker.io/boxcutter/cmake-clang \
bash -c "cmake -S . -B build && cmake --build build"
CMake 4 removed compatibility with versions older than 3.5. A project whose
cmake_minimum_required is below 3.5 fails to configure. Until the project is
updated, you can configure it anyway with
-DCMAKE_POLICY_VERSION_MINIMUM=3.5.
CMake is licensed under the BSD 3-Clause License. The license is in the image
at /opt/cmake/doc/cmake/LICENSE.rst, with the licenses of the libraries CMake
bundles in the directories next to it.
Content type
Image
Digest
sha256:b8c671d2c…
Size
276.9 MB
Last updated
4 days ago
docker pull boxcutter/cmake-clang