# Install container-structure-test with Homebrew, Nix

Validate the structure of your container images. Version 1.22.1 via Homebrew; verified 2026-07-05.

## Install

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

Additional install commands:

### macOS

- Homebrew (100%):

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

  Evidence: local Homebrew formula metadata

### Linux

- Nix (92%):

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

  Evidence: 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

## Package facts

- **Package key:** brew:container-structure-test
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/container-structure-test>
- **Version:** 1.22.1
- **Source summary:** Validate the structure of your container images
- **Homepage:** <https://github.com/GoogleContainerTools/container-structure-test>
- **Repository:** <https://github.com/GoogleContainerTools/container-structure-test>
- **Upstream docs:** <https://github.com/GoogleContainerTools/container-structure-test#readme>
- **License:** Apache-2.0
- **Source archive:** <https://github.com/GoogleContainerTools/container-structure-test/archive/refs/tags/v1.22.1.tar.gz>
- **Last updated:** 2026-07-05T18:49:52+09:00
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- container-structure-test (cli)
- container-structure-test (alias)

## Build dependencies

- go

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 1.22.1
- Package-manager updated: 2026-07-05
- Local data: ok
- Upstream repository: https://github.com/GoogleContainerTools/container-structure-test
- Upstream latest detected: v1.22.1 (current)
## Project history and usage

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.

### Project history

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.

### Adoption history

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.

### How it is used

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.

### Why package nerds care

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.

### Timeline

- 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.

### Sources

- <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>


## Security Notes

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

- **Geiger risk:** orange / medium
- broad file, network, media, or database tool signal
- infrastructure mutation or orchestration signal

## Source Database Details

- **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

## Other Package-Manager Records

- 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


## Related links

- [Cloud CLI packages](https://www.automicvault.com/pkg/cloud-clis/) - Belongs to a cloud or infrastructure command family.
- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Secret-risk packages](https://www.automicvault.com/pkg/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [go](https://www.automicvault.com/pkg/brew/go/) - Build dependency declared by Homebrew.
- [container-canary](https://www.automicvault.com/pkg/brew/container-canary/) - Shares av.db curated category or tags: cli, cloud-infrastructure, containers, testing, validation.
- [amazon-ecs-cli](https://www.automicvault.com/pkg/brew/amazon-ecs-cli/) - Shares av.db curated category or tags: cli, cloud-infrastructure, containers.
- [ansible-builder](https://www.automicvault.com/pkg/brew/ansible-builder/) - Shares av.db curated category or tags: cli, cloud-infrastructure, containers.
- [colima](https://www.automicvault.com/pkg/brew/colima/) - Shares av.db curated category or tags: cli, cloud-infrastructure, containers.
- [container](https://www.automicvault.com/pkg/brew/container/) - Shares av.db curated category or tags: cli, cloud-infrastructure, containers.
- [container-compose](https://www.automicvault.com/pkg/brew/container-compose/) - Shares av.db curated category or tags: cli, cloud-infrastructure, containers.
- [containerd](https://www.automicvault.com/pkg/brew/containerd/) - Shares av.db curated category or tags: cli, cloud-infrastructure, containers.
- [crane](https://www.automicvault.com/pkg/brew/crane/) - Shares av.db curated category or tags: cli, cloud-infrastructure, containers.
- [hub-tool](https://www.automicvault.com/pkg/brew/hub-tool/) - Local package facts share a topical domain. Shared terms: cli, cloud, cloud-infrastructure, container, container-images.

## Combined YAML source

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


## Sources

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