{"id":15040608,"url":"https://github.com/compose-generator/diu","last_synced_at":"2026-01-06T14:46:47.528Z","repository":{"id":38317963,"uuid":"343028616","full_name":"compose-generator/diu","owner":"compose-generator","description":"Docker Inspect Utils are a set of features to parse internal Docker objects.","archived":false,"fork":false,"pushed_at":"2023-05-19T02:57:14.000Z","size":42,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-01T12:26:49.947Z","etag":null,"topics":["docker","go","golang","json","library","utils"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/compose-generator.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-28T05:29:47.000Z","updated_at":"2023-03-21T00:28:52.000Z","dependencies_parsed_at":"2025-02-01T12:36:20.861Z","dependency_job_id":null,"html_url":"https://github.com/compose-generator/diu","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compose-generator%2Fdiu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compose-generator%2Fdiu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compose-generator%2Fdiu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compose-generator%2Fdiu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/compose-generator","download_url":"https://codeload.github.com/compose-generator/diu/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245799365,"owners_count":20674126,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","go","golang","json","library","utils"],"created_at":"2024-09-24T20:44:49.139Z","updated_at":"2026-01-06T14:46:47.491Z","avatar_url":"https://github.com/compose-generator.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"|:warning: | This library is deprecated and is only used by Compose Generator until Docker Manifests are fully supported by the official Docker client. For that reason, please mind that this repository is not maintained anymore. |\n|----------|:-------------------------------|\n\n# Docker Inspect Utils\n![GitHub release](https://img.shields.io/github/v/release/compose-generator/diu?include_prereleases)\n![Go CI](https://github.com/compose-generator/diu/workflows/Go%20CI/badge.svg)\n[![Go Report Card](https://goreportcard.com/badge/github.com/compose-generator/diu)](https://goreportcard.com/report/github.com/compose-generator/diu)\n[![Codecov](https://codecov.io/gh/compose-generator/diu/branch/main/graph/badge.svg?token=0EoAPqmDCv)](https://codecov.io/gh/compose-generator/diu)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)\n\nThis Go library contains a set of useful features to parse internal Docker objects and put them into handelable objects or slices.\n\n*Note: This library is part of the [Compose Generator](https://github.com/compose-generator/compose-generator) project, but also can be used independently.*\n\n## Installation\n```sh\ngo get github.com/compose-generator/diu\n```\n\n## Usage\n### Get manifest of remote image\nReturns a struct with following structure: [Structure](model/manifest.go)\n\n**Example:**\n```go\n// You also can pass the image with a custom repository e.g.: ghcr.io/compose-generator/compose-generator\nmanifest, err := GetImageManifest(\"hello-world\")\nif err == nil {\n    // Print layer count of hello-world image\n    fmt.println(\"Number of layers: \"+len(manifest.SchemaV2Manifest.Layers))\n}\n```\n\n### Get all volumes of local Docker instance\nReturns a slice of structs with following structure: [Structure](model/volume.go)\n\n**Example:**\n```go\nvolumes, err := GetExistingVolumes()\nif err == nil \u0026\u0026 len(volumes) \u003e 0 {\n    // Print layer count of hello-world image\n    fmt.println(\"Name of first volume: \"+volumes[0].Name)\n}\n```\n\n### Get all networks of local Docker instance\nReturns a slice of structs with following structure: [Structure](model/network.go)\n\n**Example:**\n```go\nnetworks, err := GetExistingNetworks()\nif err == nil \u0026\u0026 len(networks) \u003e 0 {\n    // Print layer count of hello-world image\n    fmt.println(\"Name of first networks: \"+networks[0].Name)\n}\n```\n\n## Contribute to the project\nIf you want to contribute to this project, please ensure you comply with the [contribution guidelines](CONTRIBUTING.md).\n\n© Marc Auberer 2021\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcompose-generator%2Fdiu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcompose-generator%2Fdiu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcompose-generator%2Fdiu/lists"}