dockerfmt
brew install dockerfmt
v0.5.2
MIT
Dockerfile format and parser. a modern dockfmt
36
30-day installs · #5410
150
90-day · #4701
511
365-day · #5061
604
★ GitHub stars · updated 3mo ago
Build dependencies
GitHub topics
docker
dockerfile
formatter
Links
- https://github.com/reteps/dockerfmt
- GitHub: reteps/dockerfmt
- Brew formula source: Formula/d/dockerfmt.rb
Raw metadata
{
"aliases": [],
"alternatives": [],
"build_dependencies": [
"go"
],
"categories": [],
"caveats": null,
"conflicts_with": [],
"dependencies": [],
"deprecated": 0,
"deprecation_reason": null,
"desc": "Dockerfile format and parser. a modern dockfmt",
"disable_reason": null,
"disabled": 0,
"enrichment_fetched_at": "2026-06-20T23:37:03+00:00",
"first_seen": "2026-06-20T23:34:18+00:00",
"full_name": "dockerfmt",
"github_default_branch": "main",
"github_last_commit_at": "2026-05-10T23:45:30Z",
"github_readme_excerpt": "# dockerfmt\n\n[](https://github.com/reteps/dockerfmt)\n[](https://github.com/reteps/dockerfmt/releases)\n[](LICENSE)\n\nAn opinionated Dockerfile formatter. Formats directives, normalizes whitespace, and uses [shfmt](https://github.com/mvdan/sh) to format shell commands inside `RUN` steps.\n\nSpiritual successor to [dockfmt](https://github.com/jessfraz/dockfmt), built on the [buildkit](https://github.com/moby/buildkit) parser.\n\n## Table of Contents\n\n- [Demo](#demo)\n- [Features](#features)\n- [Installation](#installation)\n- [Usage](#usage)\n- [Configuration](#configuration)\n- [Ignoring Directives](#ignoring-directives)\n- [Pre-commit](#pre-commit)\n- [Limitations](#limitations)\n\n## Demo\n\n```dockerfile\nMAINTAINER me\n\nFROM node:lts-alpine as builder\n\n\n\nCOPY . /app\nWORKDIR /app\nENV MY_VAR my-value\nENV a=1 \\\n b=2 \\\n c=3\nRUN apt-get update \u0026\u0026 \\\n # install deps\n apt-get install -y --no-install-recommends \\\n vim curl git \u0026\u0026 \\\n apt-get clean \u0026\u0026 \\\n rm -rf /var/lib/apt/lists/* \\\n \u0026\u0026 find /tmp -not -path /tmp -delete\n```\n\n```dockerfile\nLABEL org.opencontainers.image.authors=\"me\"\n\nFROM node:lts-alpine as builder\n\nCOPY . /app\nWORKDIR /app\nENV MY_VAR=my-value\nENV a=1 \\\n b=2 \\\n c=3\nRUN apt-get update \\\n # install deps\n \u0026\u0026 apt-get install -y --no-install-recommends \\\n vim curl git \\\n \u0026\u0026 apt-get clean \\\n \u0026\u0026 rm -rf /var/lib/apt/lists/* \\\n \u0026\u0026 find /tmp -not -path /tmp -delete\n```\n\n## Features\n\n- Formats shell commands in `RUN` steps via [shfmt](https://github.com/mvdan/sh) \u2014 consistent `\u0026\u0026` chains, indentation, quoting\n- Preserves and re-aligns inline comments, even across multiline `RUN` steps\n- Normalizes whitespace and extra blank lines across all directives\n- Converts legacy `ENV` syntax (`ENV ke",
"github_repo": "reteps/dockerfmt",
"github_stars": 604,
"github_topics": [
"docker",
"dockerfile",
"formatter"
],
"homepage": "https://github.com/reteps/dockerfmt",
"homepage_og_description": null,
"homepage_og_image": null,
"homepage_title": null,
"installs_30d": 36,
"installs_365d": 511,
"installs_90d": 150,
"keg_only": 0,
"keg_only_reason": null,
"last_seen": "2026-06-20T23:34:18+00:00",
"license": "MIT",
"llm_generated_at": null,
"llm_model": null,
"name": "dockerfmt",
"oldnames": [],
"one_liner": null,
"optional_dependencies": [],
"rank_30d": 5410,
"rank_365d": 5061,
"rank_90d": 4701,
"raw_hash": "9ca43ca01434ba7d",
"recommended_dependencies": [],
"revision": 0,
"ruby_source_path": "Formula/d/dockerfmt.rb",
"tap": "homebrew/core",
"test_dependencies": [],
"uses_from_macos": [],
"version_head": "HEAD",
"version_stable": "0.5.2",
"versioned_formulae": [],
"why_use_this": null
}