A base Docker image for TDD development with Clang and CppUTest. Companion to CppUTestDocker which provides the GCC variant.
- Clang 19 (via the official LLVM apt repository on
debian:bookworm-slim) - CppUTest v4.0 (compiled with Clang,
-fPICfor PIE-compatible linking) - clang-format 19
- clang-tidy 19
- include-what-you-use 0.23 (built from source against clang-19; matched ABI is required for correct suggestions)
- CMake
- cppcheck
- lcov
- James Grenning's legacy-build toolkit
Pull the image from the GitHub Container Registry:
docker pull ghcr.io/davidcozens/cpputest-clang:latest
Run tests by mounting your project directory to /home/src:
docker run -v <path>:/home/src ghcr.io/davidcozens/cpputest-clang make
The CPPUTEST_HOME environment variable is set to /home/cpputest inside the container.
For production use and traceability, prefer a specific SHA tag over latest. Each build is tagged with the commit SHA it was built from (e.g. sha-abc1234). Available tags can be found on the package page:
docker run -v <path>:/home/src ghcr.io/davidcozens/cpputest-clang:sha-<commit-sha> make
The image is built automatically via GitHub Actions on each push to main and pushed to the
GitHub Container Registry as ghcr.io/davidcozens/cpputest-clang.
To build locally:
docker build -t cpputest-clang .