containerbuildsystem / dockerfile-parse

Python library for parsing Dockerfile files.
BSD 3-Clause "New" or "Revised" License
130 stars 54 forks source link

Support parsing individual commands? #146

Open PeterJCLaw opened 7 months ago

PeterJCLaw commented 7 months ago

Thanks for this project, it looks like it could be useful. I found it while looking for something which could parse out the files from the host system which the Dockerfile actually reads. While I can see that this library supports extracting the body of a command from its instruction (i.e: COPY separate from --chmod foo:bar things/ /var/things/) I couldn't see anything beyond that. Is this something which might be in scope for this project in future, or is that layer deliberately left to the user?

PeterJCLaw commented 7 months ago

Ah, just found https://pypi.org/project/dockerfile/ which might suit my needs better. (Sharing in case others find themselves here)