A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/reteps/dockerfmt below:

reteps/dockerfmt: Dockerfile formatter. a modern dockfmt.

Dockerfile formatter, and a modern version of dockfmt. Built on top of the internal buildkit parser.

Binaries are available from the releases page.

go install github.com/reteps/dockerfmt@latest
docker run --rm -v $(pwd):/pwd ghcr.io/reteps/dockerfmt:latest /pwd/tests/in/run2.dockerfile
A updated version of the dockfmt. Uses the dockerfile parser from moby/buildkit and the shell formatter from mvdan/sh.

Usage:
  dockerfmt [Dockerfile...] [flags]
  dockerfmt [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  help        Help about any command
  version     Print the version number of dockerfmt

Flags:
  -c, --check             Check if the file(s) are formatted
  -h, --help              help for dockerfmt
  -i, --indent uint       Number of spaces to use for indentation (default 4)
  -n, --newline           End the file with a trailing newline
  -s, --space-redirects   Redirect operators will be followed by a space
  -w, --write             Write the formatted output back to the file(s)

Use "dockerfmt [command] --help" for more information about a command.

You can add the following entry to your .pre-commit-config.yaml file to use dockerfmt as a pre-commit hook:

repos:
  - repo: https://github.com/reteps/dockerfmt
    # run `pre-commit autoupdate` to pin the version
    rev: main
    hooks:
      - id: dockerfmt
        args:
          # optional: add additional arguments here
          - --indent=4

Contributions are welcome!

The JS bindings are available in the js directory. More information on how to use them can be found in the README file.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4