A Go library and CLI tool that generates Dockerfiles from various input sources like YAML files, enabling conditional Dockerfile generation.
dfg (Dockerfile Generator) is a Go-based tool that generates Dockerfiles from structured input sources like YAML files or Go code. It solves the problem of Dockerfile's lack of control flow by allowing dynamic, conditional generation of Docker instructions, making complex Docker builds more manageable.
Developers and DevOps engineers who need to generate Dockerfiles programmatically, especially those managing multi-stage builds or conditional Docker instructions in CI/CD pipelines.
It provides a flexible, programmatic way to create Dockerfiles, enabling conditional logic and reusable templates that are not possible with static Dockerfiles, all through a simple CLI or Go library.
dfg - Generates dockerfiles based on various input channels.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Enables conditional Dockerfile instructions based on input data, overcoming Dockerfile's static nature, as shown in YAML examples with logic-driven stages.
Supports input from YAML files and Go structs, with plans for JSON and TOML, allowing integration with various configuration sources.
Can be used as a Go library for programmatic generation or as a standalone CLI, catering to both automated pipelines and manual usage.
Natively supports generating multi-stage Dockerfiles with clear stage separation, evident in the library example with builder and final stages.
JSON, TOML, and stdin inputs are listed in the TODO section and not implemented, limiting current options compared to promised features.
Using it as a library requires Go knowledge and setup, which adds overhead for teams not already in the Go ecosystem.
Requires learning and maintaining YAML or Go struct configurations, adding complexity over writing Dockerfiles directly for simple cases.