{"id":13597442,"url":"https://github.com/deoxxa/docker-events","last_synced_at":"2025-07-29T11:35:02.440Z","repository":{"id":15804541,"uuid":"18544038","full_name":"deoxxa/docker-events","owner":"deoxxa","description":"Create an event emitter from dockerode's events response","archived":false,"fork":false,"pushed_at":"2018-10-29T12:06:51.000Z","size":136,"stargazers_count":32,"open_issues_count":2,"forks_count":8,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-07-20T02:47:56.220Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/deoxxa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-04-08T03:33:13.000Z","updated_at":"2023-02-20T14:49:42.000Z","dependencies_parsed_at":"2022-09-26T20:31:35.168Z","dependency_job_id":null,"html_url":"https://github.com/deoxxa/docker-events","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/deoxxa/docker-events","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deoxxa%2Fdocker-events","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deoxxa%2Fdocker-events/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deoxxa%2Fdocker-events/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deoxxa%2Fdocker-events/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deoxxa","download_url":"https://codeload.github.com/deoxxa/docker-events/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deoxxa%2Fdocker-events/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267678448,"owners_count":24126333,"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","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-08-01T17:00:33.014Z","updated_at":"2025-07-29T11:35:02.419Z","avatar_url":"https://github.com/deoxxa.png","language":"JavaScript","readme":"docker-events\n=============\n\nCreate an event emitter from dockerode's events response\n\nOverview\n--------\n\nDocker exposes an event API, allowing one to monitor the happenings of a Docker\nhost. dockerode allows for consumption of this API, albeit in a very raw form.\ndocker-events does a bit of work for you, turning the raw API of dockerode into\nsomething a little more high-level by parsing the response stream and pushing\nthings out of an EventEmitter.\n\nAPI\n---\n\n### DockerEvents (constructor)\n\n```js\nvar emitter = new DockerEvents({\n  docker: new Dockerode(options),\n});\n```\n\n### start\n\n```js\nemitter.start();\n```\n\n### stop\n\n```js\nemitter.stop();\n```\n\n### #connect\n\n```js\nemitter.on(\"connect\", function() {\n  console.log(\"connected to docker api\");\n});\n```\n\n### #disconnect\n\n```js\nemitter.on(\"disconnect\", function() {\n  console.log(\"disconnected to docker api; reconnecting\");\n});\n```\n\n### #_message\n\n```js\nemitter.on(\"_message\", function(message) {\n  console.log(\"got a message from docker: %j\", message);\n});\n```\n\n### #create\n\n```js\nemitter.on(\"create\", function(message) {\n  console.log(\"container created: %j\", message);\n});\n```\n\n### #start\n\n```js\nemitter.on(\"start\", function(message) {\n  console.log(\"container started: %j\", message);\n});\n```\n\n### #stop\n\n```js\nemitter.on(\"stop\", function(message) {\n  console.log(\"container stopped: %j\", message);\n});\n```\n\n### #die\n\n```js\nemitter.on(\"die\", function(message) {\n  console.log(\"container died: %j\", message);\n});\n```\n\n### #destroy\n\n```js\nemitter.on(\"destroy\", function(message) {\n  console.log(\"container destroyed: %j\", message);\n});\n```\n\nLicense\n-------\n\n3-clause BSD. A copy is included with the source.\n\nContact\n-------\n\n* GitHub ([deoxxa](http://github.com/deoxxa))\n* Twitter ([@deoxxa](http://twitter.com/deoxxa))\n* Email ([deoxxa@fknsrs.biz](mailto:deoxxa@fknsrs.biz))\n","funding_links":[],"categories":["Node.js"],"sub_categories":["docker"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeoxxa%2Fdocker-events","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeoxxa%2Fdocker-events","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeoxxa%2Fdocker-events/lists"}