Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Dockerfiles that have multiple parser directives #62

Closed
rcjsuen opened this issue Dec 7, 2019 · 0 comments
Closed

Add support for Dockerfiles that have multiple parser directives #62

rcjsuen opened this issue Dec 7, 2019 · 0 comments
Assignees

Comments

@rcjsuen
Copy link
Owner

rcjsuen commented Dec 7, 2019

With the introduction of the syntax parser directive, Dockerfiles now technically support two parser directives:

  • escape
  • syntax

We need to:

  1. deprecate Dockerfiles's getDirective() function as it only ever retrieves one directive
  2. introduce a new getDirectives() function to Dockerfile that returns ParserDirective[]
  3. update the parser to correctly populate getDirectives()

We should have supported getDirectives() from the beginning but did not bother to given that only the escape directive existed when the project was started. Now it is clear that would have been the better path to take.

At the Dockerfile's level, we have no idea whether someone is using the BuildKit backend or not. Although the BuildKit backend is considered to be experimental, given that the syntax directive is directly mentioned in the official channels I think we should support the parsing of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant