Skip to content

False positive DL3042 #497

@antonagestam

Description

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

Hi! We use --mount=type=cache,target=/root/.cache/pip for our pip installation step, however hadolint doesn't recognize this and errors with DL3042, suggesting we should use --no-cache-dir. If hadolint tries to be smart enough to find problems inside calls, it would be nice if it also recognizes that a cache volume is mounted here.

Expected behavior

No DL3042 error for pip installation without --no-cache-dir but with --mount=type=cache,target=/root/.cache/pip.

Actual behavior

DL3042 error for pip installation without --no-cache-dir but with --mount=type=cache,target=/root/.cache/pip.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions