docker-tools
docker-tools copied to clipboard
Migrate off of Cottle templating engine
Cottle, our templating library, presents some usability issues with our Dockerfile and Readme templates:
- Confusing syntax with no linter/syntax highlighting support
- Errors are difficult to track down and it's sometimes unclear what the problem is
- Managing whitespace is difficult
We should migrate to a different templating engine. The ideal templating engine would fulfill the following requirements:
- Extensible, so that we can add our own custom functions/commands
- Composable (Not strictly required, we currently shoehorn this into Cottle via its extensibility)
- General-purpose enough to work for both Dockerfiles and text (Markdown)
- Syntax highlighting and clear errors
- Good support
Some options immediately come to mind:
- Razor - built in to .NET, but requires ASP.NET Core libraries
- T4
- Fluid (Liquid) - port of Liquid templating engine to .NET, maintained by .NET team member, popular on NuGet
[Triage] Related: https://github.com/dotnet/dotnet-docker/issues/6251