docker-buildx-cache

1.1.0 • Public • Published

CI run

docker-buildx-cache: Improved version of "docker buildx du" and "docker buildx prune"

usage: docker-buildx-cache [-h] [--builder BUILDER]
                           [--description-len DESCRIPTION_LEN]
                           [--verbose] [--until UNTIL]
                           {du,prune}

When "du" action is run, the tool calls "docker builds du --verbose"
under the hood and represents its output in a "forest" form. Cache
layers are displayed with corresponding nesting (each layer may have
multiple parents, so they form a DAG). Colors are used to highlight
layers with common parents (or same layer ids in the DAG).

When "prune" action is run, calls "docker buildx prune", the tool
analyzes its output, the output of du, and additionally calls
"docker buildx prune" again to prune even more layers. If --verbose
is used, prints "before" and "after" forests. This action exists to
work-around the default pruning mis-behavior explained here:
https://github.com/moby/buildkit/issues/5436

positional arguments:
  {du,prune}            action to perform

options:
  -h, --help            show this help message and exit
  --builder BUILDER     builder name passed to the underlying
                        "docker buildx" commands (default: None)
  --description-len DESCRIPTION_LEN
                        shorten the description of each layer to
                        this length (default: 70)
  --verbose             print detailed colorful output (default:
                        False)
  --until UNTIL         required for "prune" action; holds numeric
                        timestamp, ISO date timestamp or duration
                        string; only the layers older than this
                        timestamp will be pruned (default: None)

Readme

Keywords

Package Sidebar

Install

npm i docker-buildx-cache

Weekly Downloads

489

Version

1.1.0

License

MIT

Unpacked Size

405 kB

Total Files

8

Last publish

Collaborators

  • dimikot