moby / buildkit

concurrent, cache-efficient, and Dockerfile-agnostic builder toolkit
https://github.com/moby/moby/issues/34227
Apache License 2.0
8.08k stars 1.14k forks source link

dockerfile: limit lint rules for FROM rules to reachable stages #5099

Open tonistiigi opened 3 months ago

tonistiigi commented 3 months ago

Currently some rules show up for FROM lines that are not part of the active target. They can be stored and only reported in the dispatch() state where it is clear that they were part of the build.

based on https://github.com/moby/buildkit/pull/5091#discussion_r1657366535