Gommit analyze commits messages to ensure they follow defined pattern. See https://github.com/antham/gommit for more information.
Mount the directory you want to check to /app.
docker run --rm -ti -v /path/to/repo:/app nrdmn/gommit check range HEAD~5 HEAD