container-inspector


Namecontainer-inspector JSON
Version 33.0.0 PyPI version JSON
download
home_pagehttps://github.com/nexB/container-inspector
SummaryDocker, containers, rootfs and virtual machine related software composition analysis (SCA) utilities.
upload_time2024-05-17 17:50:42
maintainerNone
docs_urlNone
authornexB. Inc. and others
requires_python>=3.7
licenseApache-2.0
keywords utilities docker container oci qcow os-release virtual-machine vm rootfs scancode
VCS
bugtrack_url
requirements attrs banal beautifulsoup4 binaryornot boolean.py certifi cffi chardet charset-normalizer click colorama commoncode construct cryptography debian-inspector dockerfile-parse dparse2 extractcode extractcode-7z extractcode-libarchive fasteners fingerprints ftfy future gemfileparser html5lib idna importlib-metadata inflection intbitset isodate jaraco.functools javaproperties Jinja2 jsonstreams libfwsi-python license-expression lxml MarkupSafe more-itertools normality packagedcode-msitools packageurl-python packaging parameter-expansion-patched pdfminer.six pefile pip-requirements-parser pkginfo2 pluggy plugincode ply publicsuffix2 pyahocorasick pycparser pygmars Pygments pymaven-patch pyparsing pytz PyYAML rdflib regipy requests rpm-inspector-rpm saneyaml six soupsieve spdx-tools text-unidecode toml typecode typecode-libmagic urllib3 urlpy wcwidth webencodings xmltodict zipp
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ========================
container-inspector
========================

**container-inspector** is a suite of analysis utilities and command line tools
for Docker images, containers, root filesystems and virtual machine images.

For Docker images, it can process layers and how these relate to each other as
well as Dockerfiles.

**container-inspector** provides utilities to:

 - identify Docker images in a file system, its layers and the related metadata.
 - given a Docker image, collect and report its metadata.
 - given a Docker image, extract the layers used to rebuild what how a runtime
   rootfs would look.
 - find and parse Dockerfiles.
 - find how Dockerfiles relate to actual images and their layers.
 - given a Docker image, rootfs or Virtual Machime image collect inventories of
   packages and files installed in an image or layer or rootfs
   (implemented using a provided callable)
 - detect the "distro" of a rootfs of image using os-release files (and an
   extensive test suite for these)
 - detect the operating system, architecture and


Quick start
-----------

- Only runs on POSIX OSes
- Get Python 3.6+
- Check out a clone or download of container-inspector, then run: `./configure --dev`.
- Then run `env/bin/container-inspector -h` for help.


Container image formats
-----------------------

container-inspector handles the formats of Docker images as created by the
`docker save` command. There are three versions for this Docker image format.
The latest v1.2 is a minor update to v1.1.

- v1.1 provides improved and richer metadata over v1.0 with a top level manifest.json
  file and a Config file for each image with full layer history and ordeing. It also
  use checksum for enhanced security and traceability of images and layers.

- v1.0 uses a simple `repositories` meta file and requires infering the ordering of
  the layers in an image based on each individual layer `json` meta file. This
  format is no longer support in the latest version of container-inspector.

- All V1.x formats use the same storage format for layers e.g the layer format V1.0
  where each layer is stored in a sub-directories named after the layer id.
  Each of this directories contains a "layer.tar" tarball with the layer payload,
  a "json" JSON metadata file describing the layer and a "VERSION" file describing
  the layer format version. Each tarball represents a slice or diff of the image
  root file system using the AUFS conventions.

At runtime, in a sequence of layers of an image, each root filesystem slice of a
layer is "layered" on top of each other from the root bottom layer to the latest
layer (or selected tagged layer) using a union file system (e.g. AUFS).
In AUFS, any file or directory prefixed with .wh. are "white outs" files deleting
files in the underlying layers.

See the image specifications saved in docs/references/


Internal data model
-------------------
- Image: this is a runnable image composed of metadata and a sequence of layers.
- Layer: this is a slice of an image root filesystem with a payload and metadata
- Resource: this a file or directory


Plans
-----
 - in progress: support OCI image layout
 - improved suport for Windows containers


Related tools
-------------
 - Fetching Image from remote registry is available in ScanCode.io
 - Extracting VM Image filesystems as archives is available in ExtractCode
 - Scanning for application and system packages is available in ScanCode Toolkit


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/nexB/container-inspector",
    "name": "container-inspector",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "utilities, docker, container, oci, qcow, os-release, virtual-machine, vm, rootfs, scancode",
    "author": "nexB. Inc. and others",
    "author_email": "info@aboutcode.org",
    "download_url": "https://files.pythonhosted.org/packages/57/fe/50dd7a684f740bd66ab2969888723fe6c16acff41629fb731e7e131d78bf/container_inspector-33.0.0.tar.gz",
    "platform": null,
    "description": "========================\ncontainer-inspector\n========================\n\n**container-inspector** is a suite of analysis utilities and command line tools\nfor Docker images, containers, root filesystems and virtual machine images.\n\nFor Docker images, it can process layers and how these relate to each other as\nwell as Dockerfiles.\n\n**container-inspector** provides utilities to:\n\n - identify Docker images in a file system, its layers and the related metadata.\n - given a Docker image, collect and report its metadata.\n - given a Docker image, extract the layers used to rebuild what how a runtime\n   rootfs would look.\n - find and parse Dockerfiles.\n - find how Dockerfiles relate to actual images and their layers.\n - given a Docker image, rootfs or Virtual Machime image collect inventories of\n   packages and files installed in an image or layer or rootfs\n   (implemented using a provided callable)\n - detect the \"distro\" of a rootfs of image using os-release files (and an\n   extensive test suite for these)\n - detect the operating system, architecture and\n\n\nQuick start\n-----------\n\n- Only runs on POSIX OSes\n- Get Python 3.6+\n- Check out a clone or download of container-inspector, then run: `./configure --dev`.\n- Then run `env/bin/container-inspector -h` for help.\n\n\nContainer image formats\n-----------------------\n\ncontainer-inspector handles the formats of Docker images as created by the\n`docker save` command. There are three versions for this Docker image format.\nThe latest v1.2 is a minor update to v1.1.\n\n- v1.1 provides improved and richer metadata over v1.0 with a top level manifest.json\n  file and a Config file for each image with full layer history and ordeing. It also\n  use checksum for enhanced security and traceability of images and layers.\n\n- v1.0 uses a simple `repositories` meta file and requires infering the ordering of\n  the layers in an image based on each individual layer `json` meta file. This\n  format is no longer support in the latest version of container-inspector.\n\n- All V1.x formats use the same storage format for layers e.g the layer format V1.0\n  where each layer is stored in a sub-directories named after the layer id.\n  Each of this directories contains a \"layer.tar\" tarball with the layer payload,\n  a \"json\" JSON metadata file describing the layer and a \"VERSION\" file describing\n  the layer format version. Each tarball represents a slice or diff of the image\n  root file system using the AUFS conventions.\n\nAt runtime, in a sequence of layers of an image, each root filesystem slice of a\nlayer is \"layered\" on top of each other from the root bottom layer to the latest\nlayer (or selected tagged layer) using a union file system (e.g. AUFS).\nIn AUFS, any file or directory prefixed with .wh. are \"white outs\" files deleting\nfiles in the underlying layers.\n\nSee the image specifications saved in docs/references/\n\n\nInternal data model\n-------------------\n- Image: this is a runnable image composed of metadata and a sequence of layers.\n- Layer: this is a slice of an image root filesystem with a payload and metadata\n- Resource: this a file or directory\n\n\nPlans\n-----\n - in progress: support OCI image layout\n - improved suport for Windows containers\n\n\nRelated tools\n-------------\n - Fetching Image from remote registry is available in ScanCode.io\n - Extracting VM Image filesystems as archives is available in ExtractCode\n - Scanning for application and system packages is available in ScanCode Toolkit\n\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "Docker, containers, rootfs and virtual machine related software composition analysis (SCA) utilities.",
    "version": "33.0.0",
    "project_urls": {
        "Homepage": "https://github.com/nexB/container-inspector"
    },
    "split_keywords": [
        "utilities",
        " docker",
        " container",
        " oci",
        " qcow",
        " os-release",
        " virtual-machine",
        " vm",
        " rootfs",
        " scancode"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "74aa966e81912c7771269e6608478521a40a16460868a02fa34059b1f8be0737",
                "md5": "09090a89b92e9061deff3e06bad7a50c",
                "sha256": "6284ac158c7115672ab70d1b97a22b6d257b59ee12bebc76c6048585943e919f"
            },
            "downloads": -1,
            "filename": "container_inspector-33.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "09090a89b92e9061deff3e06bad7a50c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 40235,
            "upload_time": "2024-05-17T17:50:40",
            "upload_time_iso_8601": "2024-05-17T17:50:40.722037Z",
            "url": "https://files.pythonhosted.org/packages/74/aa/966e81912c7771269e6608478521a40a16460868a02fa34059b1f8be0737/container_inspector-33.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "57fe50dd7a684f740bd66ab2969888723fe6c16acff41629fb731e7e131d78bf",
                "md5": "186d90b2be977effa8c87b97beb01547",
                "sha256": "09260edb14549648da61260c1559b507e9dcb8296a6324368ba3803ca2011f7c"
            },
            "downloads": -1,
            "filename": "container_inspector-33.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "186d90b2be977effa8c87b97beb01547",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 212468,
            "upload_time": "2024-05-17T17:50:42",
            "upload_time_iso_8601": "2024-05-17T17:50:42.647464Z",
            "url": "https://files.pythonhosted.org/packages/57/fe/50dd7a684f740bd66ab2969888723fe6c16acff41629fb731e7e131d78bf/container_inspector-33.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-17 17:50:42",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "nexB",
    "github_project": "container-inspector",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "attrs",
            "specs": [
                [
                    "==",
                    "21.4.0"
                ]
            ]
        },
        {
            "name": "banal",
            "specs": [
                [
                    "==",
                    "1.0.6"
                ]
            ]
        },
        {
            "name": "beautifulsoup4",
            "specs": [
                [
                    "==",
                    "4.11.1"
                ]
            ]
        },
        {
            "name": "binaryornot",
            "specs": [
                [
                    "==",
                    "0.4.4"
                ]
            ]
        },
        {
            "name": "boolean.py",
            "specs": [
                [
                    "==",
                    "4.0"
                ]
            ]
        },
        {
            "name": "certifi",
            "specs": [
                [
                    "==",
                    "2022.6.15"
                ]
            ]
        },
        {
            "name": "cffi",
            "specs": [
                [
                    "==",
                    "1.15.1"
                ]
            ]
        },
        {
            "name": "chardet",
            "specs": [
                [
                    "==",
                    "5.0.0"
                ]
            ]
        },
        {
            "name": "charset-normalizer",
            "specs": [
                [
                    "==",
                    "2.1.0"
                ]
            ]
        },
        {
            "name": "click",
            "specs": [
                [
                    "==",
                    "8.1.3"
                ]
            ]
        },
        {
            "name": "colorama",
            "specs": [
                [
                    "==",
                    "0.4.5"
                ]
            ]
        },
        {
            "name": "commoncode",
            "specs": [
                [
                    "==",
                    "31.2.1"
                ]
            ]
        },
        {
            "name": "construct",
            "specs": [
                [
                    "==",
                    "2.10.68"
                ]
            ]
        },
        {
            "name": "cryptography",
            "specs": [
                [
                    "==",
                    "37.0.4"
                ]
            ]
        },
        {
            "name": "debian-inspector",
            "specs": [
                [
                    "==",
                    "31.0.0b1"
                ]
            ]
        },
        {
            "name": "dockerfile-parse",
            "specs": [
                [
                    "==",
                    "1.2.0"
                ]
            ]
        },
        {
            "name": "dparse2",
            "specs": [
                [
                    "==",
                    "0.6.1"
                ]
            ]
        },
        {
            "name": "extractcode",
            "specs": [
                [
                    "==",
                    "31.0.0"
                ]
            ]
        },
        {
            "name": "extractcode-7z",
            "specs": [
                [
                    "==",
                    "16.5.210531"
                ]
            ]
        },
        {
            "name": "extractcode-libarchive",
            "specs": [
                [
                    "==",
                    "3.5.1.210531"
                ]
            ]
        },
        {
            "name": "fasteners",
            "specs": [
                [
                    "==",
                    "0.17.3"
                ]
            ]
        },
        {
            "name": "fingerprints",
            "specs": [
                [
                    "==",
                    "1.0.3"
                ]
            ]
        },
        {
            "name": "ftfy",
            "specs": [
                [
                    "==",
                    "6.1.1"
                ]
            ]
        },
        {
            "name": "future",
            "specs": [
                [
                    "==",
                    "0.18.2"
                ]
            ]
        },
        {
            "name": "gemfileparser",
            "specs": [
                [
                    "==",
                    "0.8.0"
                ]
            ]
        },
        {
            "name": "html5lib",
            "specs": [
                [
                    "==",
                    "1.1"
                ]
            ]
        },
        {
            "name": "idna",
            "specs": [
                [
                    "==",
                    "3.3"
                ]
            ]
        },
        {
            "name": "importlib-metadata",
            "specs": [
                [
                    "==",
                    "4.12.0"
                ]
            ]
        },
        {
            "name": "inflection",
            "specs": [
                [
                    "==",
                    "0.5.1"
                ]
            ]
        },
        {
            "name": "intbitset",
            "specs": [
                [
                    "==",
                    "3.1.0"
                ]
            ]
        },
        {
            "name": "isodate",
            "specs": [
                [
                    "==",
                    "0.6.1"
                ]
            ]
        },
        {
            "name": "jaraco.functools",
            "specs": [
                [
                    "==",
                    "3.5.1"
                ]
            ]
        },
        {
            "name": "javaproperties",
            "specs": [
                [
                    "==",
                    "0.8.1"
                ]
            ]
        },
        {
            "name": "Jinja2",
            "specs": [
                [
                    "==",
                    "3.1.2"
                ]
            ]
        },
        {
            "name": "jsonstreams",
            "specs": [
                [
                    "==",
                    "0.6.0"
                ]
            ]
        },
        {
            "name": "libfwsi-python",
            "specs": [
                [
                    "==",
                    "20220123"
                ]
            ]
        },
        {
            "name": "license-expression",
            "specs": [
                [
                    "==",
                    "30.0.0"
                ]
            ]
        },
        {
            "name": "lxml",
            "specs": [
                [
                    "==",
                    "4.9.1"
                ]
            ]
        },
        {
            "name": "MarkupSafe",
            "specs": [
                [
                    "==",
                    "2.1.1"
                ]
            ]
        },
        {
            "name": "more-itertools",
            "specs": [
                [
                    "==",
                    "8.13.0"
                ]
            ]
        },
        {
            "name": "normality",
            "specs": [
                [
                    "==",
                    "2.3.3"
                ]
            ]
        },
        {
            "name": "packagedcode-msitools",
            "specs": [
                [
                    "==",
                    "0.101.210706"
                ]
            ]
        },
        {
            "name": "packageurl-python",
            "specs": [
                [
                    "==",
                    "0.10.0"
                ]
            ]
        },
        {
            "name": "packaging",
            "specs": [
                [
                    "==",
                    "21.3"
                ]
            ]
        },
        {
            "name": "parameter-expansion-patched",
            "specs": [
                [
                    "==",
                    "0.3.1"
                ]
            ]
        },
        {
            "name": "pdfminer.six",
            "specs": [
                [
                    "==",
                    "20220524"
                ]
            ]
        },
        {
            "name": "pefile",
            "specs": [
                [
                    "==",
                    "2022.5.30"
                ]
            ]
        },
        {
            "name": "pip-requirements-parser",
            "specs": [
                [
                    "==",
                    "31.2.0"
                ]
            ]
        },
        {
            "name": "pkginfo2",
            "specs": [
                [
                    "==",
                    "30.0.0"
                ]
            ]
        },
        {
            "name": "pluggy",
            "specs": [
                [
                    "==",
                    "1.0.0"
                ]
            ]
        },
        {
            "name": "plugincode",
            "specs": [
                [
                    "==",
                    "31.0.0b1"
                ]
            ]
        },
        {
            "name": "ply",
            "specs": [
                [
                    "==",
                    "3.11"
                ]
            ]
        },
        {
            "name": "publicsuffix2",
            "specs": [
                [
                    "==",
                    "2.20191221"
                ]
            ]
        },
        {
            "name": "pyahocorasick",
            "specs": [
                [
                    "==",
                    "2.0.0b1"
                ]
            ]
        },
        {
            "name": "pycparser",
            "specs": [
                [
                    "==",
                    "2.21"
                ]
            ]
        },
        {
            "name": "pygmars",
            "specs": [
                [
                    "==",
                    "0.7.0"
                ]
            ]
        },
        {
            "name": "Pygments",
            "specs": [
                [
                    "==",
                    "2.12.0"
                ]
            ]
        },
        {
            "name": "pymaven-patch",
            "specs": [
                [
                    "==",
                    "0.3.0"
                ]
            ]
        },
        {
            "name": "pyparsing",
            "specs": [
                [
                    "==",
                    "3.0.9"
                ]
            ]
        },
        {
            "name": "pytz",
            "specs": [
                [
                    "==",
                    "2022.1"
                ]
            ]
        },
        {
            "name": "PyYAML",
            "specs": [
                [
                    "==",
                    "6.0"
                ]
            ]
        },
        {
            "name": "rdflib",
            "specs": [
                [
                    "==",
                    "6.2.0"
                ]
            ]
        },
        {
            "name": "regipy",
            "specs": [
                [
                    "==",
                    "3.0.2"
                ]
            ]
        },
        {
            "name": "requests",
            "specs": [
                [
                    "==",
                    "2.28.1"
                ]
            ]
        },
        {
            "name": "rpm-inspector-rpm",
            "specs": [
                [
                    "==",
                    "4.16.1.3.210404"
                ]
            ]
        },
        {
            "name": "saneyaml",
            "specs": [
                [
                    "==",
                    "0.5.2"
                ]
            ]
        },
        {
            "name": "six",
            "specs": [
                [
                    "==",
                    "1.16.0"
                ]
            ]
        },
        {
            "name": "soupsieve",
            "specs": [
                [
                    "==",
                    "2.3.2.post1"
                ]
            ]
        },
        {
            "name": "spdx-tools",
            "specs": [
                [
                    "==",
                    "0.7.0a3"
                ]
            ]
        },
        {
            "name": "text-unidecode",
            "specs": [
                [
                    "==",
                    "1.3"
                ]
            ]
        },
        {
            "name": "toml",
            "specs": [
                [
                    "==",
                    "0.10.2"
                ]
            ]
        },
        {
            "name": "typecode",
            "specs": [
                [
                    "==",
                    "30.0.0"
                ]
            ]
        },
        {
            "name": "typecode-libmagic",
            "specs": [
                [
                    "==",
                    "5.39.210531"
                ]
            ]
        },
        {
            "name": "urllib3",
            "specs": [
                [
                    "==",
                    "1.26.11"
                ]
            ]
        },
        {
            "name": "urlpy",
            "specs": [
                [
                    "==",
                    "0.5"
                ]
            ]
        },
        {
            "name": "wcwidth",
            "specs": [
                [
                    "==",
                    "0.2.5"
                ]
            ]
        },
        {
            "name": "webencodings",
            "specs": [
                [
                    "==",
                    "0.5.1"
                ]
            ]
        },
        {
            "name": "xmltodict",
            "specs": [
                [
                    "==",
                    "0.13.0"
                ]
            ]
        },
        {
            "name": "zipp",
            "specs": [
                [
                    "==",
                    "3.8.1"
                ]
            ]
        }
    ],
    "lcname": "container-inspector"
}
        
Elapsed time: 0.24654s