A base Docker image for TDD development with GCC and CppUTest. Suitable for use across multiple C/C++ projects.
- GCC 14 (via the official
gcc:14base image) - CppUTest v4.0
- CMake
- cppcheck
- clang-format, clang-tidy
- gdb, lcov
- GitHub CLI (
gh) - James Grenning's legacy-build toolkit
- autoconf, automake, libtool
Pull the image from the GitHub Container Registry:
docker pull ghcr.io/davidcozens/cpputest:latest
Run tests by mounting your project directory (containing your CMakeLists.txt or Makefile) to /home/src:
docker run -v <path>:/home/src ghcr.io/davidcozens/cpputest make
Where <path> is the fully qualified path to your project folder.
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:sha-<commit-sha> make
The image is built and pushed to the GitHub Container Registry automatically on each push to the main branch.
To build locally:
docker build -t cpputest .