Ensure no specific platform in FROM command

The optional --platform flag can be used to specify the platform of the image in case FROM references a multi-platform image. For example, linux/amd64, linux/arm64, or windows/amd64. By default, the target platform of the build request is used, so it's a best practice not to provide a specific platform to be able to build the image for cross-platform without modifying the code.

Risk Level: informational
Platform: Docker
Spectral Rule ID: DOCKR059

REMEDIATION

Remove the --platform flag in FROM

+ FROM fedora:36
- FROM --platform=arm64 fedora:36

Read more: