Skip to content

DL3041 is being triggered despite version being specified.  #1030

@Arauf2

Description

@Arauf2
  • This is a bug report
  • This is a feature request
  • [ x] I searched existing issues before opening this one

Expected behavior

Hadolint passes with no errors.

Actual behavior

DL3041 pops up.

Steps to reproduce the behavior

Have two args in my dockerfile for installing python3.12 on almalinux:

ARG PYTHON_PKG_VERSION=3.12-3.12.1-4.el9_4.1
ARG PIP_PKG_VERSION=3.12-pip-23.2.1-4.el9

microdnf install -y python${PYTHON_PKG_VERSION} python${PIP_PKG_VERSION}

^ above package names are: python3.12-3.12.1-4.el9_4.1.x86_64 and python3.12-pip-23.2.1-4.el9.noarch respectively.

hadolint --config ./hadolint.yaml ./Dockerfile
 ./Dockerfile:26 DL3041 warning: Specify version with `dnf install -y <package>-<version>`.

Either hadolint isn't parsing args correctly, or there is something not standard with the python package name. Maybe it is the hyphen, e.g python3.12-3.12.1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions