🍺 BREW Explorer

← all formulae

docker-squash

brew install docker-squash v1.2.2_7 MIT

Docker image squashing tool

54
30-day installs · #4498
229
90-day · #3960
726
365-day · #4355
949
★ GitHub stars · updated 1y ago

Runtime dependencies

Links

Raw metadata
{
  "aliases": [],
  "alternatives": [],
  "build_dependencies": [],
  "categories": [],
  "caveats": null,
  "conflicts_with": [],
  "dependencies": [
    "certifi",
    "python@3.14"
  ],
  "deprecated": 0,
  "deprecation_reason": null,
  "desc": "Docker image squashing tool",
  "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": "docker-squash",
  "github_default_branch": "main",
  "github_last_commit_at": "2025-07-04T14:02:20Z",
  "github_readme_excerpt": "``docker-squash``\n==================\n\n.. image:: https://github.com/goldmann/docker-squash/actions/workflows/squash.yml/badge.svg\n    :target: https://github.com/goldmann/docker-squash/actions/workflows/squash.yml\n\nThe problem\n-----------\n\nDocker creates many layers while building the image. Sometimes it\u0027s not necessary or desireable\nto have them in the image. For example a Dockerfile `ADD` instruction creates a single layer\nwith files you want to make available in the image. The problem arises when these files are\nonly temporary files (for example product distribution that you want to unpack). Docker will\ncarry this unnecessary layer always with the image, even if you delete these files in next\nlayer. This a waste of time (more data to push/load/save) and resources (bigger image).\n\nSquashing helps with organizing images in logical layers. Instead of\nhaving an image with multiple (in almost all cases) unnecessary layers -\nwe can control the structure of the image.\n\nFeatures\n--------\n\n- Can squash last n layers from an image\n- Can squash from a selected layer to the end (not always possible, depends on the image)\n- Support for Docker 1.9 or newer (older releases may run perfectly fine too, try it!)\n- Squashed image can be loaded back to the Docker daemon or stored as tar archive somewhere\n\nInstallation\n------------\n\nFrom source code\n\n::\n\n    $ pip install --user https://github.com/goldmann/docker-squash/archive/master.zip\n\nFrom PyPi\n\n::\n\n    $ pip install docker-squash\n\nIt is supported on Python 3.6 and above.\n\nUsage\n-----\n\n::\n\n    $ docker-squash -h\n    usage: cli.py [-h] [-v] [--version] [-d] [-f FROM_LAYER] [-t TAG]\n                  [--tmp-dir TMP_DIR] [--output-path OUTPUT_PATH]\n                  image\n\n    Docker layer squashing tool\n\n    positional arguments:\n      image                 Image to be squashed\n\n    optional arguments:\n      -h, --help            show this help message and exit\n      -v, --verbose         Verbose output\n      --version            ",
  "github_repo": "goldmann/docker-squash",
  "github_stars": 949,
  "github_topics": [],
  "homepage": "https://github.com/goldmann/docker-squash",
  "homepage_og_description": null,
  "homepage_og_image": null,
  "homepage_title": null,
  "installs_30d": 54,
  "installs_365d": 726,
  "installs_90d": 229,
  "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": "docker-squash",
  "oldnames": [],
  "one_liner": null,
  "optional_dependencies": [],
  "rank_30d": 4498,
  "rank_365d": 4355,
  "rank_90d": 3960,
  "raw_hash": "21881cec9cd6b6e6",
  "recommended_dependencies": [],
  "revision": 7,
  "ruby_source_path": "Formula/d/docker-squash.rb",
  "tap": "homebrew/core",
  "test_dependencies": [],
  "uses_from_macos": [],
  "version_head": null,
  "version_stable": "1.2.2",
  "versioned_formulae": [],
  "why_use_this": null
}