Skip to content

go library for processing container images and simulating a squash filesystem

License

Notifications You must be signed in to change notification settings

anchore/stereoscope

Folders and files

NameName
Last commit message
Last commit date
Mar 20, 2025
Sep 7, 2023
Mar 20, 2025
Mar 17, 2025
Jan 8, 2025
Mar 12, 2025
Jul 11, 2024
Oct 28, 2024
Jan 8, 2025
Mar 12, 2025
Apr 23, 2024
Jul 25, 2024
Mar 18, 2022
Sep 18, 2023
Jun 24, 2020
Apr 23, 2024
Oct 15, 2024
Oct 10, 2024
Oct 9, 2024
Feb 21, 2024
Feb 21, 2024
Mar 20, 2025
Mar 20, 2025
Feb 21, 2024
Jun 24, 2024

stereoscope

 Go Report Card   GitHub go.mod Go version   License: Apache-2.0   Join our Discourse 

A library for working with container image contents, layer file trees, and squashed file trees.

Getting Started

See examples/basic.go

docker image save centos:8 -o centos.tar
go run examples/basic.go ./centos.tar

Note: To run tests you will need skopeo installed.

Overview

This library provides the means to:

  • parse and read images from multiple sources, supporting:
    • docker V2 schema images from the docker daemon, podman, or archive
    • OCI images from disk, directory, or registry
    • singularity formatted image files
  • build a file tree representing each layer blob
  • create a squashed file tree representation for each layer
  • search one or more file trees for selected paths
  • catalog file metadata in all layers
  • query the underlying image tar for content (file content within a layer)