--- id: container-inspector version: "33.1.0" license: Apache-2.0 license_treatment: permissive maintenance: aging --- # container-inspector — Docker, containers, rootfs and virtual machine related software composition analysis (SCA) utilities. License: permissive · Maintenance: aging · Downloads: 124.9K/mo ## What it is and what it does container-inspector is a command-line and Python library suite for analyzing Docker images saved in the standard `docker save` format. It reads the layered structure of Docker images, parses their metadata, extracts Dockerfiles, and reconstructs what a runtime rootfs would look like by stacking layers according to AUFS conventions (including whiteout file handling). It also detects the Linux distribution of a rootfs using os-release files and can collect package and file inventories from images or layers using pluggable callable handlers. The package is built on four runtime dependencies: click for CLI scaffolding, attrs for data modeling, dockerfile_parse for Dockerfile analysis, and commoncode for shared utilities. It targets modern Python (3.10+) on POSIX systems and is classified as production-stable, though its maintenance cadence has slowed. Use it for: - Extract and analyze the layer structure of Docker images to understand how they were built and what files changed between layers. - Parse Dockerfiles and correlate them with actual saved Docker images to trace the relationship between build instructions and runtime artifacts. - Collect software package inventories from container images for supply-chain analysis or vulnerability scanning workflows. - Detect the base operating system and architecture of a container rootfs to support compatibility or compliance checks. - Reconstruct a flattened view of a container's runtime filesystem by layering saved image archives according to AUFS semantics. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Analyzes Docker images, containers, and virtual machine images to extract metadata, layers, Dockerfiles, and package inventories from saved image archives. Yes, if you need to analyze Docker images offline or programmatically. The package is stable, has low install friction, and solves a specific problem (Docker image forensics and composition analysis) that few other tools address directly. The aging maintenance status and 205-day release gap are minor concerns for a tool focused on stable image format handling. No known vulnerabilities. Not worth installing if you only need to fetch images from registries or scan for vulnerabilities—those are handled by related tools (ScanCode.io, ScanCode Toolkit). ## Install pip install container-inspector uv add container-inspector poetry add container-inspector ## Installing container-inspector Before you install: Low friction: pure Python wheel with four straightforward runtime dependencies (click, attrs, dockerfile_parse, commoncode). Last release was 205 days ago; repo is active and not archived, though maintenance pace is aging. License in practice: Apache-2.0 permissive license allows use in commercial and proprietary projects with minimal restrictions; you must retain license and copyright notices. Quickstart: pip install container-inspector from container_inspector.image import Image img = Image('path/to/saved/image.tar') for layer in img.layers: print(layer.metadata) Requires POSIX operating system (Linux, macOS); does not run on Windows. Requires Python 3.10 or later. Verify before relying: - Whether the package can parse OCI image layout format (described as 'in progress' in the description but not confirmed as implemented) - Actual performance and memory footprint when processing large container images - Whether Windows container support mentioned as 'improved' in plans has been implemented ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: aging - Downloads: 124.9K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags docker image analysis, container layer inspection, dockerfile parsing, rootfs metadata extraction, docker image forensics, container composition analysis, vm image inspection, docker-forensics, container-analysis, software-composition [View on SkillFed](https://skillfed.io/packages/container-inspector) · [View on PyPI](https://pypi.org/project/container-inspector/)