# dockerfmt を Homebrew, Nix でインストール

dockerfmt のインストール経路、実行ファイル、メタデータ、AI エージェント向けセキュリティノートを確認します。

## インストール

```sh
sudo av install brew:dockerfmt
```

追加のインストールコマンド:

### macOS

- Homebrew (100%):

```sh
brew install dockerfmt
```

  証拠: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#dockerfmt
```

  証拠: nixpkgs package indexes: pkgs/by-name/do/dockerfmt/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## パッケージ情報

- **パッケージキー:** brew:dockerfmt
- **パッケージマネージャ:** Homebrew
- **バージョン:** 0.5.4
- **ソース概要:** Dockerfile format and parser. a modern dockfmt
- **ホームページ:** <https://github.com/reteps/dockerfmt>
- **リポジトリ:** <https://github.com/reteps/dockerfmt>
- **最終更新:** 2026-07-28T14:10:41+02:00
- **生成日時:** 2026-08-03T19:37:03+00:00

## 実行可能ファイル

- dockerfmt (エイリアス)

## インストール挙動

- Bottle: 利用不可

## バージョンと鮮度

- ページ生成日: 2026-08-03
- マネージャ版: 0.5.4
## プロジェクトの歴史と使われ方

dockerfmt is a young, opinionated Dockerfile formatter that combines Dockerfile parsing with shell-command formatting for `RUN` instructions.

### プロジェクトの歴史

The reteps/dockerfmt repository was created in April 2025 and published its initial alpha release the next day. The README presents it as a modern successor to Jessie Frazelle's earlier `dockfmt`, built on the Moby BuildKit parser and using `shfmt` for shell fragments inside Dockerfile `RUN` steps.

The project quickly moved through 0.2.x releases in April 2025 and reached 0.5.4 in June 2026. The README's feature set includes whitespace normalization, inline-comment preservation, legacy `ENV key value` conversion, deprecated `MAINTAINER` conversion to `LABEL`, heredoc support, stdin/file operation, pre-commit support, JS/WASM bindings, and a Docker image for CI.

### 採用の歴史

Because dockerfmt is new, public adoption evidence is still thin. Its package-manager footprint is nevertheless real: Homebrew reported stable version 0.5.4, 69 installs in the previous 30 days, and 548 installs in the previous year as of June 30, 2026.

Its adoption story is also a lineage story: it exists because Dockerfile formatting remained useful after `dockfmt`, while modern BuildKit syntax, shell formatting expectations, pre-commit workflows, and CI images needed a fresher implementation.

### 使われ方

Users run `dockerfmt Dockerfile` to print formatted output, `dockerfmt -w Dockerfile` to rewrite files, `dockerfmt -c Dockerfile` to check formatting, or pipe Dockerfiles through stdin. It can read EditorConfig properties such as `indent_size` and `insert_final_newline` when formatting files by path.

### パッケージ好きにとっての重要性

dockerfmt is package-nerd significant because formatters become part of project policy. By exposing a Go binary, Docker image, pre-commit hook, and JS/WASM bindings, it tries to make Dockerfile formatting usable from local editors, CI, JavaScript tooling, and ordinary package managers.

### タイムライン

- 2025: Repository created and 0.1.0-alpha initial release published.
- 2025: 0.2.x releases added JavaScript release work and bug fixes.
- 2026: 0.5.4 released and Homebrew formula reports stable 0.5.4.

### Related projects

- dockerfmt is directly related to `dockfmt`, Moby BuildKit's Dockerfile parser, and `shfmt`.
- It also fits into pre-commit and CI formatting workflows, similar to language-specific formatters such as gofmt and prettier, but for Dockerfiles.

### ソース

- <https://github.com/reteps/dockerfmt#readme>
- <https://api.github.com/repos/reteps/dockerfmt>
- <https://github.com/reteps/dockerfmt/releases/tag/0.1.0-alpha>
- <https://github.com/reteps/dockerfmt/releases/tag/v0.5.4>
- <https://formulae.brew.sh/api/formula/dockerfmt.json>


## セキュリティノート

narrow executable package without higher-risk signals.

- **Geiger リスク:** グリーン / 低
- narrow executable package without higher-risk signals

## 他のパッケージマネージャ記録

- Nix - dockerfmt: normalized package name match | nixpkgs package indexes: pkgs/by-name/do/dockerfmt/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1


## Combined YAML source

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


## ソース

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