no-redundant-target-platform
What it does
Section titled “What it does”Reports a FROM with --platform=$TARGETPLATFORM (or ${TARGETPLATFORM}), which is what FROM does without the option.
Why it matters
Section titled “Why it matters”The target platform is already the default platform of a FROM, so the option changes nothing and only makes a reader look for what it does. Drop it.
Example
Section titled “Example”...FROM --platform=$TARGETPLATFORM alpine:3...FROM alpine:3@sha256:abc...Configuration
Section titled “Configuration”dockerfile: lint: rules: no-redundant-target-platform: warn # off (default), warn, errorEnabled by the presets: dockerfile/hadolint.
Suppress one line with sudsy-disable-next-line no-redundant-target-platform in a comment of the file’s language.
Upstream equivalents
Section titled “Upstream equivalents”The same check in other tools; Sudsy reports what each upstream rule reports.
| Tool | Rule | Match |
|---|---|---|
| hadolint | DL3065 |
full |