Closed aqabawe closed 3 years ago
Sorry. I have no idea. :disappointed:
I have seen that error somewhere before but can´t remember what was the issue.
Maybe there is some package or different configuration on the self-hosted runners that results in this error.
Runs for me on a self-hosted runner. I initially had the same error message but realized I forgot to include a checkout step :see_no_evil:
....
steps:
- name: Check out code
uses: actions/checkout@v1
- uses: brpaz/hadolint-action@v1.1.0
with:
dockerfile: Dockerfile
@aqabawe If you still have this problem, please see @agners comment. I will close this issue for now. Feel free to reopen.
I ran into this issue today when trying to run hadolint on a self-hosted runner. I use a custom working directory which works fine for my other linting jobs, but not hadolint. Not sure if hadolint is ignoring the working-directory
option.
Working directory configuration:
defaults:
run:
working-directory: my-custom-dir
Failing action configuration:
- name: Lint with hadolint
uses: hadolint/hadolint-action@v1.5.0
with:
dockerfile: Dockerfile
Successful job configuration:
- name: Lint with hadolint
uses: hadolint/hadolint-action@v1.5.0
with:
dockerfile: my-custom-dir/Dockerfile
Just had the same problem. The reason was, that the file to check did not exist.
Hadolint should be looking for Dockerfiles, if it finds any then that dockerfile should be checked. how does it know that it should be looking for a specific file and then it does not find it, it should fail? am I missing smth?
The same workflow runs fine on ubuntu-latest, but fails with
hadolint: Dockerfile: openBinaryFile: does not exist (No such file or directory)
on our self-hosted runner, any thoughts?