-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Is your feature request related to a problem? Please describe.
Manually parsing the FROM fields in Dockerfiles can quickly become complex and error-prone, especially when handling the different possible syntaxes (e.g., digests, aliases, platform selectors). This led to issues in PR #930, as noted in the review: #930 (comment)
Describe the solution you'd like
Use a standard OCI image parsing library to extract and manipulate fields from Dockerfile FROM instructions. This would improve robustness and maintainability of the code and avoid reinventing parsing logic.
Describe alternatives you've considered
Keep the custom in-house parsing logic, but that requires ongoing maintenance and increases the risk of bugs. A dedicated parsing library would provide stronger guarantees and reduce maintenance burden.
Additional context
Example discussion and justification in PR #930: #930 (comment)
There are existing libraries to parse OCI image references depending on Go.