Skip to content

DL3042 false positive, --no-chache-dir is a few lines below #1042

@NickLarsenNZ

Description

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

Expected behavior

There should be no lint error

Actual behavior

Dockerfile:5 DL3042 warning: Avoid use of cache directory with pip. Use `pip install --no-cache-dir <package>`

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:

Haskell Dockerfile Linter 2.12.0

Dockerfile (if relevant)

# syntax=docker/dockerfile:1.8.1@sha256:e87caa74dcb7d46cd820352bfea12591f3dba3ddc4285e19c7dcd13359f7cefd

FROM python:3.12

RUN python3 -m venv /app \
    && source /app/bin/activate \
    && pip install \
        --no-cache-dir \
        --upgrade \
        tzdata

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

  • NixOS
  • Github Actions runner (ubuntu-latest)

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