Modernized Dockerfile Formatter: dockerfmt

2025-04-09
Modernized Dockerfile Formatter: dockerfmt

Introducing dockerfmt, a modernized Dockerfile formatter built on top of the buildkit parser. It offers improved support for RUN commands (though grouping and semicolons are not yet supported), basic inline comment support, and various command-line options for checking, writing, indentation, and newline handling. JS bindings are also provided for easy integration. While features like line wrapping for long JSON commands and the # escape=X directive are not yet implemented, dockerfmt provides a user-friendly and effective way to format your Dockerfiles.

Development formatter