Skip to content

coffeemakingtoaster/dockerfile-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dockerfile parser

Basic dockerfile parser

Note: This is more of a PoC than a production ready parser

Known Issues

  • Multiline commands
  • Optional array parsing where supported
  • Support for expose statement exposing multiple ports
  • Stage reference detection
  • Dockerfiles not starting with FROM (apparently they can start with ARG)
  • Comments (inline do not get detected)
  • Arg behaviour parsing when not actively setting a value
  • Parser directives -> Are recognized and parsed into the ast...but as of now I dont actually do anything with them
  • The full extend of heredoc (basics are implemented)
  • Bash like variabe magic
  • Comments in the middle of multi line run statements are currently swallowed and thrown out as multi line run statements are currently just smashed together
  • Tab characters after Instructions break the parser
  • Rework shell command parsing or embedd shellcheck, currently command1|command2 leads to issues

Benchmarking

go test -bench=. ./...

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •