ci: add Dockerfile linting with Hadolint#429
Open
ivantodorovich wants to merge 1 commit intorelease-4.5.Xfrom
Open
ci: add Dockerfile linting with Hadolint#429ivantodorovich wants to merge 1 commit intorelease-4.5.Xfrom
ivantodorovich wants to merge 1 commit intorelease-4.5.Xfrom
Conversation
Add Hadolint to CI and pre-commit to catch Dockerfile issues automatically. New files: - .hadolint.yaml: project-specific rule configuration - .pre-commit-config.yaml: hadolint-docker hook for local linting - hadolint job in GitHub Actions workflow (runs in parallel with build) Fixes for existing Dockerfile issues found by Hadolint: - Replace deprecated MAINTAINER with LABEL maintainer= (DL4000) - Add trailing slash to multi-arg COPY destinations (DL3021) - Consolidate consecutive RUN instructions in example (DL3059) - Use WORKDIR instead of cd in example (DL3003)
d46a05a to
71a5495
Compare
florentx
approved these changes
Apr 13, 2026
| steps: | ||
| - uses: actions/checkout@v6 | ||
| - name: Lint Dockerfiles | ||
| uses: hadolint/hadolint-action@v3.3.0 |
Contributor
There was a problem hiding this comment.
1st question
Should we start pinning actions to commit SHA instead of tag, as recommended?
https://docs.github.com/en/actions/reference/security/secure-use#using-third-party-actions
2nd question
What is benefit of having it in a separate job, if it is already part of pre-commit hooks?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add Hadolint to CI and pre-commit to catch Dockerfile issues automatically.
Fixes for existing Dockerfile issues found by Hadolint: