Dockerfile code formatter plugin for dprint.
Then in your project's directory with a dprint.json file, run:
dprint add dockerfileSee https://dprint.dev/plugins/dockerfile/ for more information.
By default, this plugin formats files named Dockerfile or Containerfile (Podman and Buildah), and files with a .dockerfile, .Dockerfile, .containerfile or .Containerfile extension (ex. app.Dockerfile).
To also format files like Dockerfile.dev or Containerfile.prod, add an association to your dprint.json. Associations are added to the default matches, so they don't need to be repeated:
{ "dockerfile": { "associations": ["**/Dockerfile.*", "**/Containerfile.*"] } }