Install Link to heading
It’s not available in any package manager, so use the Docker image:
docker run --rm -it -v "$PWD":/work -w /work hadolint/hadolint:latest-alpine sh
Configure Link to heading
Add a .hadolint.yaml
file containing your rules:
---
ignored:
- DL3018
Use Link to heading
Single file:
hadolint ./path/to/Dockerfile
All files:
find . -name Dockerfile | xargs hadolint
Files known to git:
hadolint $(git ls-files | grep Dockerfile)