Skip to content

Add support for --exclude flag in COPY and ADD instructions #1029

Open
@wonderfulspam

Description

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

Expected behavior

Hadolint should be able to lint a Dockerfile which uses the experimental --exclude flag given that the Docker image builds successfully.

Actual behavior

Hadolint fails to lint the file, producing this error:

invalid flag: --exclude

Steps to reproduce the behavior

Run hadolint on the Dockerfile provided below.

Output of docker run --rm hadolint/hadolint hadolint --version:

Haskell Dockerfile Linter 2.12.1

Dockerfile (if relevant)

# syntax=docker/dockerfile:1.7-labs
FROM alpine
COPY --exclude=code/sensitive_data ./code code

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

n/a

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