# 使用 Homebrew, Nix 安装 container-structure-test

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

## 安装

```sh
sudo av install brew:container-structure-test
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install container-structure-test
```

  证据: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#container-structure-test
```

  证据: nixpkgs package indexes: pkgs/by-name/co/container-structure-test/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## 软件包事实

- **软件包键:** brew:container-structure-test
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/container-structure-test>
- **版本:** 1.22.1
- **来源摘要:** Validate the structure of your container images
- **主页:** <https://github.com/GoogleContainerTools/container-structure-test>
- **仓库:** <https://github.com/GoogleContainerTools/container-structure-test>
- **许可证:** Apache-2.0
- **源码归档:** <https://github.com/GoogleContainerTools/container-structure-test/archive/refs/tags/v1.22.1.tar.gz>
- **最后更新:** 2026-07-27T22:04:04+02:00
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- container-structure-test (cli)
- container-structure-test (别名)

## 构建依赖

- go

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 1.22.1
- 管理器更新时间: 2026-07-27
- 本地数据: OK
- 上游仓库: https://github.com/GoogleContainerTools/container-structure-test
- 检测到的最新版本: v1.22.1 (当前)
## 项目历史与用法

Container Structure Tests is a GoogleContainerTools project for validating container image contents, command behavior, filesystem state, and metadata. It became a common package-manager entry because it is a standalone binary aimed at CI checks for built images.

### 项目历史

The project released v0.1.0 in October 2017 and v1.0.0 in March 2018. Its README now describes the project as not officially supported by Google and in maintenance mode, while still accepting contributions.

### 采用历史

Official documentation emphasizes local binary use, Docker-image use, and Google Cloud Builder use. It also documents Homebrew installation for macOS, which helped make the CLI easy to install outside a larger Google Cloud SDK.

### 使用方式

Users provide YAML or JSON test files to `container-structure-test test --image ... --config ...`. The test types cover command output, file existence, file contents, image metadata, and license checks, which are the concerns image publishers usually want to verify before release.

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

The package matters because it made container image assertions portable: the test spec can live beside a Dockerfile, and CI can fail the image artifact rather than only failing application unit tests. Its explicit schema versioning and single-purpose binary made it attractive to packaging and release pipelines.

### 时间线

- 2017: v0.1.0 release published.
- 2018: v1.0.0 release published.
- 2025: v1.22.1 release published while the README described the project as in maintenance mode.

### Related projects

- The README references Docker, Google Cloud Builder, and container image metadata rather than a specific runtime integration.

### 来源

- <https://github.com/GoogleContainerTools/container-structure-test#readme>
- <https://github.com/GoogleContainerTools/container-structure-test/releases/tag/v0.1.0>
- <https://github.com/GoogleContainerTools/container-structure-test/releases/tag/v1.0.0>
- <https://github.com/GoogleContainerTools/container-structure-test/releases/tag/v1.22.1>


## 安全说明

broad file, network, media, or database tool signal. infrastructure mutation or orchestration signal.

- **Geiger 风险:** orange / 中
- broad file, network, media, or database tool signal
- infrastructure mutation or orchestration signal

## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** container-structure-test
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## 其他软件包管理器记录

- Nix - container-structure-test: normalized package name match | nixpkgs package indexes: pkgs/by-name/co/container-structure-test/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1


## 相关链接

- [Cloud CLI packages](https://pkg.so/zh-hans/cloud-clis/) - Belongs to a cloud or infrastructure command family.
- [Source-control packages](https://pkg.so/zh-hans/source-control-tools/) - Belongs to a source-control command family.
- [Secret-risk packages](https://pkg.so/zh-hans/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [go](https://pkg.so/zh-hans/brew/go/) - Build dependency declared by Homebrew.
- [container-canary](https://pkg.so/zh-hans/brew/container-canary/) - Shares pkgdb curated category or tags: cli, cloud-infrastructure, containers, testing, validation.
- [colima](https://pkg.so/zh-hans/brew/colima/) - Shares pkgdb curated category or tags: cli, cloud-infrastructure, containers.
- [oras](https://pkg.so/zh-hans/brew/oras/) - Shares pkgdb curated category or tags: cli, cloud-infrastructure, containers.
- [skopeo](https://pkg.so/zh-hans/brew/skopeo/) - Shares pkgdb curated category or tags: cli, cloud-infrastructure, containers.
- [container](https://pkg.so/zh-hans/brew/container/) - Shares pkgdb curated category or tags: cli, cloud-infrastructure, containers.
- [crane](https://pkg.so/zh-hans/brew/crane/) - Shares pkgdb curated category or tags: cli, cloud-infrastructure, containers.
- [apko](https://pkg.so/zh-hans/brew/apko/) - Shares pkgdb curated category or tags: cli, cloud-infrastructure, container-images, containers.
- [container-compose](https://pkg.so/zh-hans/brew/container-compose/) - Shares pkgdb curated category or tags: cli, cloud-infrastructure, containers.

## Combined YAML source

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


## 来源

- pkg.so package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
