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

DL3041 warnings when package name is not hyphen-separated from version #981

Open
2 of 3 tasks
davewhiteley opened this issue Oct 2, 2023 · 0 comments
Open
2 of 3 tasks

Comments

@davewhiteley
Copy link

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

Expected behavior

Preferably there would be no DL3041 warnings when a package is dnf install 'd that is not hyphen-separated from its pinned version, especially when such packages are unavailable.

Example: python-3.11 does not cause a DL3041 warning, but in not available; python3.11 is available, but causes warnings.

Actual behavior

DL3041 warning: Specify version with `dnf install -y <package>-<version>`.

Steps to reproduce the behavior

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

$ hadolint --version
Haskell Dockerfile Linter 2.12.0

Dockerfile

ARG python_version=3.11
RUN microdnf install -y python${python_version} \
                        python${python_version}-pip \

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

Base image is originally based on IronBank RedHat UBI 9.2 minimal

$ cat /etc/os-release | grep PRETTY_NAME
PRETTY_NAME="Red Hat Enterprise Linux 9.2 (Plow)"
$ microdnf repolist

repo id                               repo name
ubi-9-appstream-rpms                  Red Hat Universal Base Image 9 (RPMs) - AppStream
ubi-9-baseos-rpms                     Red Hat Universal Base Image 9 (RPMs) - BaseOS
ubi-9-codeready-builder               Red Hat Universal Base Image 9 (RPMs) - CodeReady Builder
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