.hadolint.yaml not being respected
- [x] This is a bug report
- [ ] This is a feature request
- [ ] I searched existing issues before opening this one
Expected behaviour
hadolint test.dockerfile --config .hadolint.yaml run from a location where all those files are present should lint 'test.dockerfile' with '.hadolint.yaml' with hadolint.exe
Actual behaviour
The hadolint application does execute but it reports errors that should have been ignored as per the .hadolint.yaml file.
Steps to reproduce the behaviour
- Setup a clean environment (I'm using Windows 11)
- Choose a location and store the hadolint executable alongside '.hadolint.yaml' and test.dockerfile in the same location.
- Open a command prompt and CD to the location of the files from step two
- run the following command:>hadolint.exe test.dockerfile --config .hadolint.yaml
Output of hadolint --version or
docker run --rm hadolint/hadolint hadolint --version or
docker run --rm ghcr.io/hadolint/hadolint hadolint --version:
N/A
I also tried to run hadolint independent of the config file with the rule manually ignored '--ignore DL3006' which does work as expected. I am also sure that it is looking at the config file because If I leave it blank hadolint complains as it should.
Dockerfile (if relevant)
FROM busybox
WORKDIR usr/src/app
Additional environment details (OS, stack version, etc.)
I'm using Windows 11 on a 100% clean install with no other applications.
There is also a duplicate issue here 'https://github.com/michaellzc/vscode-hadolint/issues/87' because I initially thought it was a problem with the VSC plugin. But that turns out not to be the case.
Any news on this ?
Hey there,
spelling in the config file needs to be very accurate. Hadolint expects the key ignored (notice the d at the end) for the list of rules to ignore:
ignored:
- DL3006