buildkit icon indicating copy to clipboard operation
buildkit copied to clipboard

Restructure the dockerfile parser packages and enhance relevant docs

Open jedevc opened this issue 3 years ago • 0 comments

This set of patches refactors the location of the dockerfile parser code, bundling all the parser code together into one package, and exposing a new high-level Parse function that can be used to parse the entire dockerfile contents into the relevant stages and commands.

Additionally, new doc-comments for the parser are added, to hopefully enhance the developer-documentation experience at https://pkg.go.dev/github.com/moby/[email protected]/frontend/dockerfile/parser and https://pkg.go.dev/github.com/moby/[email protected]/frontend/dockerfile/instructions.

This was a quick patch, and not quite sure about whether the move to bundling the parser code in this way is desirable, or whether it might even be useful to attempt to merge the ast and instructions packages together and split out a separate commands package?

jedevc avatar Jul 06 '22 11:07 jedevc