A framework to validate the structure of container images through command, file, and metadata tests.
Container Structure Test is an open-source framework for validating the structure and configuration of container images. It solves the problem of ensuring container images meet specific standards by allowing developers to write tests that check command outputs, file existence and content, and metadata. This helps catch configuration errors and security issues before deployment.
DevOps engineers, SREs, and developers building and deploying containerized applications who need to enforce image standards and integrate validation into CI/CD pipelines.
Developers choose Container Structure Test because it provides a declarative, code-based approach to container validation, integrates with tools like Bazel and Google Cloud Build, and supports multiple test types without requiring a Docker daemon for file checks, making it versatile for various environments.
validate the structure of your container images
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Tests are defined as code in YAML or JSON files, enabling version control and easy integration into development workflows, as shown in the extensive config examples.
Supports Docker and tar drivers, allowing file and metadata tests without a Docker daemon, which is useful for CI/CD in restricted environments.
Generates test reports in text, JSON, or JUnit formats, facilitating seamless integration with pipeline tools like Jenkins or Google Cloud Build.
Covers command outputs, file existence/content, and container metadata, providing a holistic approach to image validation with regex support for precision.
The project is officially in maintenance mode and not actively supported by Google, risking unaddressed bugs and lack of new features over time.
Running command tests requires a functioning Docker daemon; the tar driver does not support them, limiting testing capabilities in Docker-less setups.
Requires manual binary installation and careful YAML/JSON configuration, which can be complex for teams new to container testing frameworks, with schema versioning (e.g., schemaVersion 2.0.0) adding extra steps.