A CLI tool that visualizes multi-stage Dockerfiles as dependency graphs using Graphviz.
dockerfilegraph is a command-line tool that visualizes multi-stage Dockerfiles as dependency graphs. It parses Dockerfiles to generate graphical representations of build stages and their dependencies, helping developers understand, document, and debug complex container build processes. The tool uses Graphviz to produce output in formats like PDF, SVG, and PNG.
DevOps engineers, platform engineers, and developers working with complex multi-stage Docker builds who need to visualize dependencies and optimize build pipelines.
It provides automated, customizable visualizations directly from Dockerfiles without manual diagramming, offering unique insights into build stage relationships and dependency flows that are hard to trace in text alone.
Visualize your multi-stage Dockerfiles
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Maps all build stages, default targets, and external images as distinct nodes, clearly showing complex dependencies that are hard to trace in text, as evidenced by the example outputs with legends and layers.
Differentiates between FROM, COPY --from, and RUN --mount dependencies with unique line styles and arrows, aiding in precise debugging of build processes, which is highlighted in the README's edge descriptions.
Exports graphs in multiple formats including PDF, SVG, and PNG via the --output flag, allowing seamless integration into documentation and presentations without conversion hassles.
Supports legends, layer visualization, target filtering, and layout tuning through command-line flags like --legend and --target, enabling tailored graphs for specific debugging or documentation needs.
Requires Graphviz to be installed locally for native builds and mise installations, adding an extra setup step that can be a barrier in environments without package manager access or where external tools are restricted.
Generates only static image files (PDF, SVG, PNG), lacking interactive features like zoom, pan, or clickable nodes that could enhance exploration and collaboration for large, complex graphs.
Does not support visualization of Docker Compose files or other container orchestration configurations, which limits its utility for projects relying on multi-service setups beyond single Dockerfile builds.