-
Notifications
You must be signed in to change notification settings - Fork 493
DL3029: Improve BUILDPLATFORM/TARGETPLATFORM exceptions #861
Copy link
Copy link
Closed
Description
- This is a bug report
- This is a feature request
- I searched existing issues before opening this one
Expected behavior
These cases should be allowed:
--platform=$TARGETPLATFORM--platform="$BUILDPLATFORM"--platform=${BUILDPLATFORM}--platform=${BUILDPLATFORM:-}--platform="${BUILDPLATFORM:-}"
Actual behavior
The rule only checks for a literal $BUILDPLATFORM, adding braces, quotes, parameter expansions... or using TARGETPLATFORM results in:
DL3029 warning: Do not use --platform flag with FROM
Steps to reproduce the behavior
Use FROM --platform="${TARGETPLATFORM:-linux/amd64}" and run hadolint.
Dockerfile (if relevant)
FROM --platform="${TARGETPLATFORM:-linux/amd64}" docker.io/library/busyboxAdditional environment details (OS, stack version, etc.)
Follow up to #772
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels