Skip to content

Require label error is triggered when label isn't set on the first stage and set on the next for multistage Dockerfile #758

@Jasstkn

Description

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

Expected behavior

No errors. There is no need to copy paste LABEL section because at the end only the final stage will be saved.

Actual behavior

Errors about missing label

Dockerfile:1 DL3049 info: Label `team` is missing.
Dockerfile:1 DL3049 info: Label `maintainer` is missing.

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

Dockerfile (if relevant)

FROM alpine:3.11 as build

....

FROM alpine:3.11

LABEL team="devops" maintainer="example.com"

.....

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

Metadata

Metadata

Assignees

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