# 使用 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
- **版本:** 1.2.2
- **来源摘要:** Docker image squashing tool
- **主页:** <https://github.com/goldmann/docker-squash>
- **最后更新:** 2026-05-21T10:31:32Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- docker-squash (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 1.2.2
## 项目历史与用法

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。



## Combined YAML source

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


## 来源

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- cross-ecosystem install command graph
