Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DNF Rule "Specify Version" Not Applying to dnf-plugins-core #1002

Open
2 tasks done
oliverisaac opened this issue Feb 20, 2024 · 0 comments
Open
2 tasks done

DNF Rule "Specify Version" Not Applying to dnf-plugins-core #1002

oliverisaac opened this issue Feb 20, 2024 · 0 comments

Comments

@oliverisaac
Copy link

oliverisaac commented Feb 20, 2024

  • 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.1

Dockerfile (if relevant)

FROM rockylinux:9.3
RUN dnf install -y dnf-plugins-core \
    && dnf clean all

Additional environment details (OS, stack version, etc.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant