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

Wrong warning about specifying '-y' for microdnf #998

Open
2 of 3 tasks
soenkeliebau opened this issue Feb 2, 2024 · 0 comments
Open
2 of 3 tasks

Wrong warning about specifying '-y' for microdnf #998

soenkeliebau opened this issue Feb 2, 2024 · 0 comments

Comments

@soenkeliebau
Copy link

  • This is a bug report
  • This is a feature request
  • I searched existing issues before opening this one

Expected behavior

When using microdnf to install software in a Dockerfile and omitting the '-y' parameter Hadolint warns about specifying it to bypass any user questions.

However for microdnf (as opposed to dnf) the default is to not ask, so this parameter is not needed for microdnf.
Hadolint should not throw a warning about this command in a Dockerfile

Actual behavior

Hadolint warns about the missing '-y' parameter.

image

Steps to reproduce the behavior

Run hadolint on a Dockerfile with a microdnf command (example given below).

Output of hadolint --version or
docker run --rm hadolint/hadolint hadolint --version or
docker run --rm ghcr.io/hadolint/hadolint hadolint --version:

Can't directly run the exact version due to this being run as part of a github action with reviewdog, version pulled in is specified here:

https://github.com/reviewdog/action-hadolint/blob/v1.36.0/action.yml#L48

RUN microdnf update --setopt=install_weak_deps=0 && \
    microdnf install tar gzip zip kubectl && \
    microdnf clean all

Additional environment details (OS, stack version, etc.)
This is running as a github action with the following version of the action:

  hadolint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1
      - uses: reviewdog/action-hadolint@f7d29ec6dd89022747bd18b5a151b62ac2f1555e # v1.36.0
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