All Projects → patrickhoefler → dockerfilegraph

patrickhoefler / dockerfilegraph

Licence: MIT license
Visualize your multi-stage Dockerfiles

Programming Languages

go
31211 projects - #10 most used programming language
Dockerfile
14818 projects
Makefile
30231 projects

Projects that are alternatives of or similar to dockerfilegraph

Uecs
Ubpa Entity-Component-System (U ECS) in Unity3D-style
Stars: ✭ 174 (+216.36%)
Mutual labels:  graphviz
Visualize ruby
Transform code into a flowchart and experimentally trace the execution path through it
Stars: ✭ 237 (+330.91%)
Mutual labels:  graphviz
filegrain
transport-agnostic, fine-grained content-addressable container image layout
Stars: ✭ 23 (-58.18%)
Mutual labels:  container
Diagrams
🎨 Diagram as Code for prototyping cloud system architectures
Stars: ✭ 15,756 (+28547.27%)
Mutual labels:  graphviz
Deepgraph
Analyze Data with Pandas-based Networks. Documentation:
Stars: ✭ 232 (+321.82%)
Mutual labels:  graphviz
Azure Plantuml
PlantUML sprites, macros, and other includes for Azure services
Stars: ✭ 247 (+349.09%)
Mutual labels:  graphviz
Psgraph
A set of utilities for working with Graphviz in Powershell
Stars: ✭ 160 (+190.91%)
Mutual labels:  graphviz
hybridnet
A CNI plugin, provides networking environment where overlay and underlay containers can run on the same node and have cluster-wide bidirectional network connectivity.
Stars: ✭ 188 (+241.82%)
Mutual labels:  container
Ansible Playbook Grapher
A command line tool to create a graph representing your Ansible playbook tasks and roles
Stars: ✭ 234 (+325.45%)
Mutual labels:  graphviz
di
🐑 A flexible dependency injection container; It is an implementation of PSR-11
Stars: ✭ 20 (-63.64%)
Mutual labels:  container
Gofsm
a featured FSM that can export state images
Stars: ✭ 222 (+303.64%)
Mutual labels:  graphviz
Graphviz
A Swift package for working with GraphViz
Stars: ✭ 230 (+318.18%)
Mutual labels:  graphviz
pouchrobot
An AI robot to collaborate in any open source project on GitHub
Stars: ✭ 39 (-29.09%)
Mutual labels:  container
Go Graphviz
Go bindings for Graphviz
Stars: ✭ 183 (+232.73%)
Mutual labels:  graphviz
ecto erd
A mix task for generating Entity Relationship Diagram from Ecto schemas available in your project.
Stars: ✭ 173 (+214.55%)
Mutual labels:  graphviz
Dot To Ascii
Graphviz to ASCII converter using Graph::Easy
Stars: ✭ 168 (+205.45%)
Mutual labels:  graphviz
C4 Plantuml
C4-PlantUML combines the benefits of PlantUML and the C4 model for providing a simple way of describing and communicate software architectures
Stars: ✭ 3,522 (+6303.64%)
Mutual labels:  graphviz
nginx-lua
Nginx 1.19+ with LUA support based on Alpine Linux, Amazon Linux, Debian, Fedora and Ubuntu.
Stars: ✭ 112 (+103.64%)
Mutual labels:  container
docker eventer
A Docker container to notify about Docker events written in Python
Stars: ✭ 14 (-74.55%)
Mutual labels:  container
docker-electrumx
Run an Electrum server with one command
Stars: ✭ 87 (+58.18%)
Mutual labels:  container

dockerfilegraph

GitHub Workflow Status Go Report Card GitHub release (latest SemVer) GitHub

dockerfilegraph visualizes your multi-stage Dockerfiles.

It creates a visual graph representation of the build process. The graph contains the following nodes:

  • All build stages
  • The default build target (highlighted in grey)
  • External images (with dashed borders)

The edges of the graph represent:

  • FROM ... dependencies (with a solid line and a full arrow head)
  • COPY --from=... dependencies (with a dashed line and an empty arrow head)
  • RUN --mount=type=cache,from=... dependencies (with a dotted line and an empty diamond arrow head)

You can add an optional legend to the graph and change the output format and resolution. For all the details, see the options below.

Example Output

Dockerfile graph including a --legend

Example output including a legend

Dockerfile graph visualizing the image --layers

Example output including layers

Complex Dockerfile graph created with --concentrate --nodesep 0.3 --unflatten 4

Example output with --concentrate and --unflatten 4

Getting Started

Prerequisites

Installation and Usage

Running dockerfilegraph without any arguments will create a Dockerfile.pdf in your current working directory. This PDF contains a visual graph representation of your multi-stage Dockerfile.

docker / nerdctl

Image based on Ubuntu 22.10
docker run \
  --rm \
  --user "$(id -u):$(id -g)" \
  --workdir /workspace \
  --volume "$(pwd)":/workspace \
  ghcr.io/patrickhoefler/dockerfilegraph
Image based on Alpine Linux
docker run \
  --rm \
  --user "$(id -u):$(id -g)" \
  --workdir /workspace \
  --volume "$(pwd)":/workspace \
  ghcr.io/patrickhoefler/dockerfilegraph:alpine

Homebrew

brew install patrickhoefler/tap/dockerfilegraph
dockerfilegraph

toolctl

toolctl install dockerfilegraph
dockerfilegraph

Build from Source

Make sure that Graphviz is installed locally.

Then:

make build
./dockerfilegraph

More Options

❯ dockerfilegraph --help
dockerfilegraph visualizes your multi-stage Dockerfile.
It creates a visual graph representation of the build process.

Usage:
  dockerfilegraph [flags]

Flags:
  -c, --concentrate             concentrate the edges (default false)
  -d, --dpi uint                dots per inch of the PNG export (default 96)
  -e, --edgestyle               style of the graph edges, one of: default, solid (default default)
  -f, --filename string         name of the Dockerfile (default "Dockerfile")
  -h, --help                    help for dockerfilegraph
      --layers                  display all layers (default false)
      --legend                  add a legend (default false)
  -m, --max-label-length uint   maximum length of the node labels, must be at least 4 (default 20)
  -n, --nodesep float           minimum space between two adjacent nodes in the same rank (default 1)
  -o, --output                  output file format, one of: canon, dot, pdf, png, raw, svg (default pdf)
  -r, --ranksep float           minimum separation between ranks (default 0.5)
  -u, --unflatten uint          stagger length of leaf edges between [1,u] (default 0)
      --version                 display the version of dockerfilegraph

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].