{"id":16372013,"url":"https://github.com/qard/container-info","last_synced_at":"2025-03-16T15:33:27.168Z","repository":{"id":46046140,"uuid":"162645634","full_name":"Qard/container-info","owner":"Qard","description":"Parse container info from cgroups file","archived":false,"fork":false,"pushed_at":"2021-11-18T02:34:59.000Z","size":46,"stargazers_count":7,"open_issues_count":5,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-13T22:20:29.520Z","etag":null,"topics":["cgroups","containers","docker","kubernetes","nodejs"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Qard.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-12-21T00:31:57.000Z","updated_at":"2023-07-16T20:49:48.000Z","dependencies_parsed_at":"2022-09-26T18:30:53.709Z","dependency_job_id":null,"html_url":"https://github.com/Qard/container-info","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qard%2Fcontainer-info","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qard%2Fcontainer-info/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qard%2Fcontainer-info/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qard%2Fcontainer-info/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Qard","download_url":"https://codeload.github.com/Qard/container-info/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221665602,"owners_count":16860290,"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":["cgroups","containers","docker","kubernetes","nodejs"],"created_at":"2024-10-11T03:10:18.853Z","updated_at":"2024-10-27T10:51:56.335Z","avatar_url":"https://github.com/Qard.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# container-info\n\nParse container info from cgroups file.\n\n## Install\n\n```sh\nnpm install container-info\n```\n\n## Usage\n\n```js\nconst getContainerInfo = require('container-info')\n\n// Sync\nconst { containerId, podId } = getContainerInfo.sync()\nconsole.log({ containerId, podId })\n\n// Async\ngetContainerInfo().then(({ containerId, podId }) =\u003e {\n  console.log({ containerId, podId })\n})\n\n// Parse cgroup file contents\nconst { containerId, podId } = getContainerInfo.parse(`\n  1:name=systemd:/kubepods.slice/kubepods-burstable.slice/kubepods-burstable-pod90d81341_92de_11e7_8cf2_507b9d4141fa.slice/crio-2227daf62df6694645fee5df53c1f91271546a9560e8600a525690ae252b7f63.scope\n`)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqard%2Fcontainer-info","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqard%2Fcontainer-info","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqard%2Fcontainer-info/lists"}