-
Notifications
You must be signed in to change notification settings - Fork 493
DNF Rule "Specify Version" Not Applying to dnf-plugins-core #1002
Copy link
Copy link
Closed
Description
- This is a bug report
- I searched existing issues before opening this one
Expected behavior
I would expect a docker line of:
RUN dnf install -y dnf-plugins-core \
&& dnf clean all
To return an error of:
-:5 DL3041 warning: Specify version with `dnf install -y <package>-<version>`.
Actual behavior
Hadolint runs successfully with no errors.
Steps to reproduce the behavior
Use this dockerfile:
FROM rockylinux:9.3
RUN dnf install -y dnf-plugins-core \
&& dnf clean all
And run hadolint against it.
This oneliner works:
printf "%s\n" "FROM rockylinux:9.3" "RUN dnf install -y dnf-plugins-core && dnf clean all" | docker run --rm -i hadolint/hadolint
If you add, e.g., openssl to the install command then it works as expected:
$ printf "%s\n" "FROM rockylinux:9.3" "RUN dnf install -y openssl dnf-plugins-core && dnf clean all" | docker run --rm -i hadolint/hadolint
-:2 DL3041 warning: Specify version with `dnf install -y <package>-<version>`.
Output of hadolint --version or
docker run --rm hadolint/hadolint hadolint --version or
docker run --rm ghcr.io/hadolint/hadolint hadolint --version:
Haskell Dockerfile Linter 2.12.1Dockerfile (if relevant)
FROM rockylinux:9.3
RUN dnf install -y dnf-plugins-core \
&& dnf clean allAdditional environment details (OS, stack version, etc.)
Reactions are currently unavailable