Assuming your project Makefile
has a grind
target which runs valgrind on it.
echo 'from thlorenz/valgrind' > Dockerfile
docker build -t="my_make" .
docker run -i -rm my_make grind
If valgrind doesn't work on your system, i.e. Mac OS X Mavericks you can still get all the benefits by running it in a docker container.
Runable example.
MIT