# 使用 Homebrew 安装 docker-squash

查看 docker-squash 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:docker-squash
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install docker-squash
```

  证据: local Homebrew formula metadata

## 软件包事实

- **软件包键:** brew:docker-squash
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/docker-squash>
- **版本:** 1.2.2
- **来源摘要:** Docker image squashing tool
- **主页:** <https://github.com/goldmann/docker-squash>
- **仓库:** <https://github.com/goldmann/docker-squash>
- **上游文档:** <https://github.com/goldmann/docker-squash#readme>
- **许可证:** MIT
- **源码归档:** <https://files.pythonhosted.org/packages/77/ef/45dc63f3f0f3fba18306dac34d9be26f9dd0d1a0742a7f0ca39cf1a98b15/docker_squash-1.2.2.tar.gz>
- **最后更新:** 2026-05-21T10:31:32Z
- **已生成:** 2026-07-08T18:08:21+00:00

## 可执行文件

- docker-squash (cli)
- docker-squash (别名)

## 依赖

- certifi
- python@3.14

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 all

## 版本和新鲜度

- 页面生成时间: 2026-07-08
- 管理器版本: 1.2.2
- 管理器更新时间: 2026-05-21
- 本地数据: OK
- 上游仓库: https://github.com/goldmann/docker-squash
- 信息: No cached GitHub release or tag data was available.
## 项目历史与用法

docker-squash is a Python CLI for squashing Docker image layers. It grew out of a practical image-size problem: Dockerfile instructions create layers, temporary build artifacts can remain in earlier layers, and pushing, saving, or loading those images can cost unnecessary time and storage.

### 项目历史

The README describes docker-squash as a tool that can squash the last n layers of an image or squash from a selected layer to the end, then load the result back into the Docker daemon or store it as a tar archive. It explicitly frames squashing as a way to organize images into more logical layers and avoid carrying temporary files.

### 采用历史

The project was packaged for installation from source, PyPI, and Homebrew. Its relevance is strongest in the legacy Docker builder era, before BuildKit and multi-stage builds reduced the need for post-processing images to remove build-time artifacts.

### 使用方式

A typical command selects an image, optionally sets --from-layer or a number of layers, tags the new image with --tag, writes an archive with --output-path, or controls whether the result is loaded back into Docker. The README examples compare docker history before and after squashing to show layer changes.

### 为什么软件包爱好者会关心

docker-squash is notable because it packages image-layer surgery as a normal CLI command. It is a useful historical artifact for understanding how Docker users handled layer bloat before modern Dockerfile patterns and BuildKit made the problem less central.

### 时间线

- Docker 1.9 era: The README documents Docker 1.9 or newer support.
- Python 3 era: The README documents Python 3.6 and newer support.
- BuildKit era: Docker documents the legacy Linux image builder as deprecated, making squashing tools more historical and niche.

### Related projects

- Related projects include Docker Engine, Docker's legacy builder, BuildKit, multi-stage Dockerfiles, and the docker history command used to inspect image layers.

### 来源

- <https://github.com/goldmann/docker-squash#readme>
- <https://docs.docker.com/engine/deprecated/#legacy-builder-for-linux-images>


## 安全说明

没有找到 docker-squash 的匹配本地密钥处理 manifest。Nucleus 软件包元数据仍在此发布，以便未来覆盖拥有稳定的软件包 URL。


## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** docker-squash
- **Version Scheme:** 0
- **Revision:** 7
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable


## 相关链接

- [Cloud CLI packages](https://www.automicvault.com/zh-hans/pkg/cloud-clis/) - Belongs to a cloud or infrastructure command family.
- [Source-control packages](https://www.automicvault.com/zh-hans/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://www.automicvault.com/zh-hans/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/zh-hans/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [python@3.14](https://www.automicvault.com/zh-hans/pkg/brew/python-3-14/) - Runtime dependency declared by Homebrew.
- [dockviz](https://www.automicvault.com/zh-hans/pkg/brew/dockviz/) - Shares av.db curated category or tags: cli, container-images, containers, developer-tools, docker.
- [cdebug](https://www.automicvault.com/zh-hans/pkg/brew/cdebug/) - Shares av.db curated category or tags: cli, containers, developer-tools, docker.
- [cek](https://www.automicvault.com/zh-hans/pkg/brew/cek/) - Shares av.db curated category or tags: cli, container-images, containers, developer-tools.
- [cekit](https://www.automicvault.com/zh-hans/pkg/brew/cekit/) - Shares av.db curated category or tags: cli, containers, developer-tools, docker.
- [devcontainer](https://www.automicvault.com/zh-hans/pkg/brew/devcontainer/) - Shares av.db curated category or tags: cli, containers, developer-tools, docker.
- [dive](https://www.automicvault.com/zh-hans/pkg/brew/dive/) - Shares av.db curated category or tags: cli, containers, developer-tools, docker.
- [dockcheck](https://www.automicvault.com/zh-hans/pkg/brew/dockcheck/) - Shares av.db curated category or tags: cli, containers, developer-tools, docker.
- [docker](https://www.automicvault.com/zh-hans/pkg/brew/docker/) - Shares av.db curated category or tags: cli, containers, developer-tools, docker.
- [docker-clean](https://www.automicvault.com/zh-hans/pkg/brew/docker-clean/) - Package names and metadata indicate a similar tool family. Shared terms: cli, containers, developer, developer-tools, docker.
- [docker-debug](https://www.automicvault.com/zh-hans/pkg/brew/docker-debug/) - Package names and metadata indicate a similar tool family. Shared terms: cli, container, containers, developer, developer-tools.
- [docker-gen](https://www.automicvault.com/zh-hans/pkg/brew/docker-gen/) - Package names and metadata indicate a similar tool family. Shared terms: cli, container, containers, developer, developer-tools.

## Combined YAML source

View the package source record on GitHub. [combined/docker-squash.yml](https://github.com/automic-vault/db/blob/main/combined/docker-squash.yml)


## 来源

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- cross-ecosystem install command graph
