Dockerfile to build latest and any tagged version of cppcheck.
Main aims:
-
Ability to build the most recent version of cppcheck. With this Dockerfile you can build the lastest main branch.
-
Make the result image as small as possible. This Dockerfile uses alpine linux and removes any unneeded file and strips the resulting cppcheck binary.
-
Easy to use. Only need to mount a directory to /src to start check.
CI/CD will automatically build, test and push new images to container registries. Currently, the following registries are supported:
docker run -v $(pwd):/src neszt/cppcheck-docker
To allow Ctrl + C during cppcheck run use -t
docker argument:
docker run -t -v $(pwd):/src neszt/cppcheck-docker
docker build -t cppcheck .
For Specific version use any tag from cppcheck tags
docker build --build-arg SOURCE_BRANCH=2.2 -t cppcheck .