dockerfile-parser-rs icon indicating copy to clipboard operation
dockerfile-parser-rs copied to clipboard

Better parsing of SHELL

Open dsherret opened this issue 4 years ago • 0 comments

Shell has the following structure:

SHELL ["executable", "parameters"]

Example:

SHELL ["/bin/sh", "-c"]
SHELL ["cmd", "/S", "/C"]

Instead of a MiscInstruction where this gets parsed as a BreakableString, it would probably be best to have this parsed as a ShellInstruction and have an elements: StringArray property (StringArray is from #17).

I can contribute this once #17 lands if this sounds good.

https://docs.docker.com/engine/reference/builder/#shell

dsherret avatar Oct 09 '21 16:10 dsherret