Comments (3)
Could it be the reason that there is no Dockerfile
in the root of the project?
from hadolint-action.
Same issue here
my .pre-commit.yaml
file
repos:
- repo: https://github.com/hadolint/hadolint
rev: v2.12.0
hooks:
- id: hadolint-docker
output
Lint Dockerfiles.........................................................Failed
- hook id: hadolint-docker
- exit code: 1
hadolint: Dockerfile.template: withBinaryFile: does not exist (No such file or directory)
hadolint: latest/Dockerfile.tws: withBinaryFile: does not exist (No such file or directory)
The files stated on the output are there, and the linter can find them. however it fails.
If I change my pre-commit config file to
repos:
- repo: https://github.com/hadolint/hadolint
rev: v2.12.0
hooks:
- id: hadolint
it works fine
from hadolint-action.
I've seen this when there is no Dockerfile in the repo in any directory or subdirectory.
This usually happens when the repo is fresh (no Dockerfile yet) or if the Dockerfiles were deleted in the commit.
The first one is quite obvious, but the second one means that github action is executed when the files were deleted and actually step should be skipped.
So this Github Action should be patched to support this, I do not have solution for it.
Yet if anyone is interested I can provide custom GitHub workflow that handles the case (skip action if no Dockerfiles are changed or are deleted). If someone is interested I can get it next week.
With proper github action workflow in the script it would probably take a bit more time, but is also doable.
from hadolint-action.
Related Issues (20)
- Missing Changelog HOT 2
- How do I run hadolint on arm64?
- How recursive scan from a defined directory? HOT 1
- Improvements: no-fail flag and file output
- Error: Unable to process command '::add-matcher::./tmp.nA8912gdP6/problem-matcher.json' HOT 1
- Release management: improve semantic versioning HOT 2
- Reported issues wont fail the build HOT 1
- Enable dependabot in Settings HOT 1
- How to lint multiple dockerfiles, without specifying the action for each? HOT 2
- [INVESTIGATED/TESTED] Configuration File Pathing Issue + Subsequent Issue HOT 2
- Error: No hadolint failure but Actions job fails HOT 16
- Provide v2 HOT 1
- `set-output` deprecation
- Problem matcher picks up issues that were ignored in the config file
- How to use hadolint action within organization repo? HOT 1
- Capture severity in problem matcher
- received unexpected HTTP status: 503 Service Unavailable HOT 2
- Dockerfile is a directory
- Jenkins Piplines unable to check multeple dockerfiles.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hadolint-action.