# 使用 Homebrew 安装 dockerfilegraph

查看 dockerfilegraph 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:dockerfilegraph
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install dockerfilegraph
```

  证据: local Homebrew formula metadata

## 软件包事实

- **软件包键:** brew:dockerfilegraph
- **软件包管理器:** Homebrew
- **版本:** 0.21.0
- **来源摘要:** Visualize your multi-stage Dockerfiles
- **主页:** <https://github.com/patrickhoefler/dockerfilegraph>
- **仓库:** <https://github.com/patrickhoefler/dockerfilegraph>
- **最后更新:** 2026-07-28T14:10:41+02:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- dockerfilegraph (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 0.21.0
## 项目历史与用法

dockerfilegraph is a Go CLI that turns multi-stage Dockerfiles into Graphviz dependency diagrams.

### 项目历史

Patrick Hoefler's repository was created in February 2021 and released v0.1.0 the same day. The README frames the tool around a common Docker build problem: multi-stage Dockerfiles become hard to reason about once stages, external images, `COPY --from`, and mount-based dependencies accumulate.

The project continued to receive regular releases through the 0.21.x line by March 2026. Its output model matured around build-stage nodes, highlighted default targets, external-image nodes, and edge styles for `FROM`, `COPY --from`, and `RUN --mount ... from=` dependencies.

### 采用历史

dockerfilegraph remains a specialist visualization tool rather than a default Docker workflow. Its install paths still matter to package users: the README documents Docker/ghcr usage, Homebrew installation from the author's tap, mise installation from GitHub, and source builds.

The Homebrew formula API reported stable version 0.21.0, 16 installs in the previous 30 days, and 477 installs in the previous year as of June 30, 2026. That is modest adoption, but credible for a focused Dockerfile architecture/debugging utility.

### 使用方式

Running `dockerfilegraph` in a project directory generates a graph for `Dockerfile`, with output formats including PDF, SVG, and PNG. Flags support legends, layer display, target filtering, scratch-image handling, separated external-image nodes, and Graphviz layout tuning.

### 为什么软件包爱好者会关心

The package is notable because it externalizes Docker build structure into ordinary graph artifacts. It is the kind of CLI package maintainers like: a single executable plus Graphviz turns opaque build-stage relationships into inspectable files for reviews, docs, and debugging.

### 时间线

- 2021: Repository created and v0.1.0 released.
- 2025: 0.19.x releases show continuing maintenance.
- 2026: v0.21.0 released and Homebrew formula reports stable 0.21.0.

### Related projects

- dockerfilegraph depends conceptually on Docker multi-stage builds and uses Graphviz for graph rendering.
- It overlaps with documentation and build-debugging workflows rather than with Docker runtime management tools.

### 来源

- <https://github.com/patrickhoefler/dockerfilegraph#readme>
- <https://api.github.com/repos/patrickhoefler/dockerfilegraph>
- <https://github.com/patrickhoefler/dockerfilegraph/releases/tag/v0.1.0>
- <https://github.com/patrickhoefler/dockerfilegraph/releases/tag/v0.21.0>
- <https://formulae.brew.sh/api/formula/dockerfilegraph.json>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals


## Combined YAML source

View the package source record on GitHub. [combined/dockerfilegraph.yml](https://github.com/mxcl/pkgdb/blob/main/combined/dockerfilegraph.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- cross-ecosystem install command graph
