Skip to content

The USER must be specified #1025

Open
Open
@h4kc

Description

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

Expected behavior

When the USER is not specified in a docker file, it should trigger a warning because the user will be root.

Actual behavior

The DL3002 warning is checking if the last user is not a root. But if USER is not set the user of the container is root and warning is triggred

Steps to reproduce the behavior

Any docker file not having USER set.

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.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