{"id":13416530,"url":"https://github.com/apocas/dockerode","last_synced_at":"2025-09-09T20:46:19.568Z","repository":{"id":10335170,"uuid":"12467623","full_name":"apocas/dockerode","owner":"apocas","description":"Docker + Node = Dockerode (Node.js module for Docker's Remote API)","archived":false,"fork":false,"pushed_at":"2025-06-25T09:48:23.000Z","size":868,"stargazers_count":4641,"open_issues_count":31,"forks_count":476,"subscribers_count":63,"default_branch":"master","last_synced_at":"2025-09-05T07:56:30.650Z","etag":null,"topics":["docker","javascript","moby","node","nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/apocas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"apocas"}},"created_at":"2013-08-29T18:16:12.000Z","updated_at":"2025-09-05T07:49:15.000Z","dependencies_parsed_at":"2024-02-16T01:26:13.564Z","dependency_job_id":"03eff1d7-bd3e-4e3d-ae21-540a818fee52","html_url":"https://github.com/apocas/dockerode","commit_stats":{"total_commits":496,"total_committers":119,"mean_commits":4.168067226890757,"dds":"0.39717741935483875","last_synced_commit":"49bd8c4c231efe9bb432b28d51dbae3e50ddd010"},"previous_names":[],"tags_count":70,"template":false,"template_full_name":null,"purl":"pkg:github/apocas/dockerode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apocas%2Fdockerode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apocas%2Fdockerode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apocas%2Fdockerode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apocas%2Fdockerode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apocas","download_url":"https://codeload.github.com/apocas/dockerode/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apocas%2Fdockerode/sbom","scorecard":{"id":202974,"data":{"date":"2025-08-11","repo":{"name":"github.com/apocas/dockerode","commit":"7bc1d4c12ae5b277cb4c9a19988124c0ec5367c4"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.5,"checks":[{"name":"Code-Review","score":2,"reason":"Found 5/17 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/main.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":4,"reason":"4 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 4","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/apocas/dockerode/main.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/apocas/dockerode/main.yml/master?enable=pin","Warn: containerImage not pinned by hash: examples/build/Dockerfile:1: pin your Docker image by updating ubuntu to ubuntu@sha256:7c06e91f61fa88c08cc74f7e1b7c69ae24910d745357e0dfe1d2c0322aaf20f9","Warn: containerImage not pinned by hash: test/Dockerfile:1: pin your Docker image by updating ubuntu to ubuntu@sha256:7c06e91f61fa88c08cc74f7e1b7c69ae24910d745357e0dfe1d2c0322aaf20f9","Warn: containerImage not pinned by hash: test/buildkit.Dockerfile:1: pin your Docker image by updating alpine to alpine@sha256:4bcff63911fcb4448bd4fdacec207030997caf25e9bea4045fa6c8c44de311d1","Warn: npmCommand not pinned by hash: .github/workflows/main.yml:32","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   3 containerImage dependencies pinned","Info:   0 out of   1 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":3,"reason":"SAST tool is not run on all commits -- score normalized to 3","details":["Warn: 6 commits out of 18 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-16T23:08:26.561Z","repository_id":10335170,"created_at":"2025-08-16T23:08:26.561Z","updated_at":"2025-08-16T23:08:26.561Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274359027,"owners_count":25270683,"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-09-09T02:00:10.223Z","response_time":80,"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":["docker","javascript","moby","node","nodejs"],"created_at":"2024-07-30T21:01:00.268Z","updated_at":"2025-09-09T20:46:19.532Z","avatar_url":"https://github.com/apocas.png","language":"JavaScript","readme":"# dockerode\n\nNot another Node.js Docker Remote API module.\n\n`dockerode` objectives:\n\n* **streams** - `dockerode` does NOT break any stream, it passes them to you allowing for some stream voodoo.\n* **stream demux** - Supports optional [stream demultiplexing](https://github.com/apocas/dockerode#helper-functions).\n* **entities** - containers, images and execs are defined entities and not random static methods.\n* **run** - `dockerode` allow you to seamless run commands in a container aka `docker run`.\n* **tests** - `dockerode` really aims to have a good test set, allowing to follow `Docker` changes easily, quickly and painlessly.\n* **feature-rich** - There's a real effort in keeping **All** `Docker` Remote API features implemented and tested.\n* **interfaces** - Features **callback** and **promise** based interfaces, making everyone happy :)\n\n## Ecosystem\n\n * docker-modem [https://github.com/apocas/docker-modem](https://github.com/apocas/docker-modem) - Docker's API network stack\n * dockerode-compose [https://github.com/apocas/dockerode-compose](https://github.com/apocas/dockerode-compose) - docker-compose in Node.js\n\n## Installation\n\n`npm install dockerode`\n\n## Usage\n\n * Input options are directly passed to Docker. Check [Docker API documentation](https://docs.docker.com/engine/api/latest/) for more details.\n * Return values are unchanged from Docker, official Docker documentation will also apply to them.\n * Check the tests and examples folder for more examples.\n\n### Getting started\n\nTo use `dockerode` first you need to instantiate it:\n\n``` js\nvar Docker = require('dockerode');\nvar docker = new Docker({socketPath: '/var/run/docker.sock'});\nvar docker1 = new Docker(); //defaults to above if env variables are not used\nvar docker2 = new Docker({host: 'http://192.168.1.10', port: 3000});\nvar docker3 = new Docker({protocol:'http', host: '127.0.0.1', port: 3000});\nvar docker4 = new Docker({host: '127.0.0.1', port: 3000}); //defaults to http\n\n//protocol http vs https is automatically detected\nvar docker5 = new Docker({\n  host: '192.168.1.10',\n  port: process.env.DOCKER_PORT || 2375,\n  ca: fs.readFileSync('ca.pem'),\n  cert: fs.readFileSync('cert.pem'),\n  key: fs.readFileSync('key.pem'),\n  version: 'v1.25' // required when Docker \u003e= v1.13, https://docs.docker.com/engine/api/version-history/\n});\n\nvar docker6 = new Docker({\n  protocol: 'https', //you can enforce a protocol\n  host: '192.168.1.10',\n  port: process.env.DOCKER_PORT || 2375,\n  ca: fs.readFileSync('ca.pem'),\n  cert: fs.readFileSync('cert.pem'),\n  key: fs.readFileSync('key.pem')\n});\n\n//using a different promise library (default is the native one)\nvar docker7 = new Docker({\n  Promise: require('bluebird')\n  //...\n});\n//...\n```\n\n### Manipulating a container:\n\n``` js\n// create a container entity. does not query API\nvar container = docker.getContainer('71501a8ab0f8');\n\n// query API for container info\ncontainer.inspect(function (err, data) {\n  console.log(data);\n});\n\ncontainer.start(function (err, data) {\n  console.log(data);\n});\n\ncontainer.remove(function (err, data) {\n  console.log(data);\n});\n\n// promises are supported\nvar auxContainer;\ndocker.createContainer({\n  Image: 'ubuntu',\n  AttachStdin: false,\n  AttachStdout: true,\n  AttachStderr: true,\n  Tty: true,\n  Cmd: ['/bin/bash', '-c', 'tail -f /var/log/dmesg'],\n  OpenStdin: false,\n  StdinOnce: false\n}).then(function(container) {\n  auxContainer = container;\n  return auxContainer.start();\n}).then(function(data) {\n  return auxContainer.resize({\n    h: process.stdout.rows,\n    w: process.stdout.columns\n  });\n}).then(function(data) {\n  return auxContainer.stop();\n}).then(function(data) {\n  return auxContainer.remove();\n}).then(function(data) {\n  console.log('container removed');\n}).catch(function(err) {\n  console.log(err);\n});\n```\n\nYou may also specify default options for each container's operations, which will always be used for the specified container and operation.\n\n``` js\ncontainer.defaultOptions.start.Binds = [\"/tmp:/tmp:rw\"];\n```\n\n### Stopping all containers on a host\n\n``` js\ndocker.listContainers(function (err, containers) {\n  containers.forEach(function (containerInfo) {\n    docker.getContainer(containerInfo.Id).stop(cb);\n  });\n});\n```\n\n### Building an Image\nContext: provides the path to the Dockerfile. Additionaly files that are involved in the build *must* be explicitly mentioned in src array, since they are sent to a temp env to build. Example: file for COPY command are extracted from that temporary environment.  \n\n``` js\ndocker.buildImage('archive.tar', {t: imageName}, function (err, response){\n  //...\n});\n\ndocker.buildImage({\n  context: __dirname,\n  src: ['Dockerfile', 'file1', 'file2']\n}, {t: imageName}, function (err, response) {\n  //...\n});\n```\n\n`buildImage` returns a Promise of NodeJS stream. In case you want to find out when the build has finished, you must follow the progress of the build with the `modem` instance in dockerode:\n\n``` js\nlet dockerode = new Dockerode();\nlet stream = await dockerode.buildImage(...);\nawait new Promise((resolve, reject) =\u003e {\n  dockerode.modem.followProgress(stream, (err, res) =\u003e err ? reject(err) : resolve(res));\n});\n// Build has finished\n```\n\n\n### Creating a container:\n\n``` js\ndocker.createContainer({Image: 'ubuntu', Cmd: ['/bin/bash'], name: 'ubuntu-test'}, function (err, container) {\n  container.start(function (err, data) {\n    //...\n  });\n});\n//...\n```\n\n### Streams goodness:\n\n``` js\n//tty:true\ndocker.createContainer({ /*...*/ Tty: true /*...*/ }, function(err, container) {\n\n  /* ... */\n\n  container.attach({stream: true, stdout: true, stderr: true}, function (err, stream) {\n    stream.pipe(process.stdout);\n  });\n\n  /* ... */\n});\n\n//tty:false\ndocker.createContainer({ /*...*/ Tty: false /*...*/ }, function(err, container) {\n\n  /* ... */\n\n  container.attach({stream: true, stdout: true, stderr: true}, function (err, stream) {\n    //dockerode may demultiplex attach streams for you :)\n    container.modem.demuxStream(stream, process.stdout, process.stderr);\n  });\n\n  /* ... */\n});\n\ndocker.createImage({fromImage: 'ubuntu'}, function (err, stream) {\n  stream.pipe(process.stdout);\n});\n\n//...\n```\n\nThere is also support for [HTTP connection hijacking](https://docs.docker.com/engine/api/v1.45/#tag/Container/operation/ContainerAttach),\nwhich allows for cleaner interactions with commands that work with stdin and stdout separately.\n\n```js\ndocker.createContainer({Tty: false, /*... other options */}, function(err, container) {\n  container.start(function(err) {\n    container.exec({Cmd: ['shasum', '-'], AttachStdin: true, AttachStdout: true}, function(err, exec) {\n      exec.start({hijack: true, stdin: true}, function(err, stream) {\n        // shasum can't finish until after its stdin has been closed, telling it that it has\n        // read all the bytes it needs to sum. Without a socket upgrade, there is no way to\n        // close the write-side of the stream without also closing the read-side!\n        fs.createReadStream('node-v5.1.0.tgz', 'binary').pipe(stream);\n\n        // Fortunately, we have a regular TCP socket now, so when the readstream finishes and closes our\n        // stream, it is still open for reading and we will still get our results :-)\n        docker.modem.demuxStream(stream, process.stdout, process.stderr);\n      });\n    });\n  });\n});\n```\n\n### Equivalent of `docker run` in `dockerode`:\n\n* `image` - container image\n* `cmd` - command to be executed\n* `stream` - stream(s) which will be used for execution output.\n* `create_options` - (optional) Options used for container creation. Refer to the [DockerEngine ContainerCreate documentation](https://docs.docker.com/engine/api/v1.37/#operation/ContainerCreate) for the possible values\n* `start_options` - (optional) Options used for container start. Refer to the [DockerEngine ContainerStart documentation](https://docs.docker.com/engine/api/v1.37/#operation/ContainerStart) for the possible values\n* `callback` - callback called when execution ends (optional, promise will be returned if not used).\n\n``` js\n//callback\ndocker.run('ubuntu', ['bash', '-c', 'uname -a'], process.stdout, function (err, data, container) {\n  console.log(data.StatusCode);\n});\n\n//promise\ndocker.run(testImage, ['bash', '-c', 'uname -a'], process.stdout).then(function(data) {\n  var output = data[0];\n  var container = data[1];\n  console.log(output.StatusCode);\n  return container.remove();\n}).then(function(data) {\n  console.log('container removed');\n}).catch(function(err) {\n  console.log(err);\n});\n```\n\nor, if you want to split stdout and stderr (you must to pass `Tty:false` as an option for this to work)\n\n``` js\ndocker.run('ubuntu', ['bash', '-c', 'uname -a'], [process.stdout, process.stderr], {Tty:false}, function (err, data, container) {\n  console.log(data.StatusCode);\n});\n```\n\nIf you provide a callback, `run` will return an EventEmitter supporting the following events: container, stream, data.\nIf a callback isn't provided a promise will be returned.\n\n``` js\ndocker.run('ubuntu', ['bash', '-c', 'uname -a'], [process.stdout, process.stderr], {Tty:false}, function (err, data, container) {\n  //...\n}).on('container', function (container) {\n  //...\n});\n```\n\nAnd here is one more complex example using auto-remove and Docker network.\n\n``` js\ndocker.run('some-python-image', ['python', 'main.py', arg], process.stdout, {name: 'my-python-container', HostConfig: { AutoRemove: true, NetworkMode: 'my_network'}}, function(err, data, container) {\n  // Do stuff\n});\n```\n\n### Equivalent of `docker pull` in `dockerode`:\n\n* `repoTag` - container image name (optionally with tag)\n  `myrepo/myname:withtag`\n* `options` - extra options passed to create image.\n* `callback` - callback called when execution ends.\n\n``` js\ndocker.pull('myrepo/myname:tag', function (err, stream) {\n  // streaming output from pull...\n});\n```\n\n#### Pull from private repos\n\n`docker-modem` already base64 encodes the necessary auth object for you.\n\n``` js\nvar auth = {\n  username: 'username',\n  password: 'password',\n  auth: '',\n  email: 'your@email.email',\n  serveraddress: 'https://index.docker.io/v1'\n};\n\ndocker.pull('tag', {'authconfig': auth}, function (err, stream) {\n  //...\n});\n```\n\nIf you already have a base64 encoded auth object, you can use it directly:\n\n```js\nvar auth = { key: 'yJ1J2ZXJhZGRyZXNzIjoitZSI6Im4OCIsImF1dGgiOiIiLCJlbWFpbCI6ImZvbGllLmFkcmc2VybmF0iLCJzZX5jb2aHR0cHM6Ly9pbmRleC5kb2NrZXIuaW8vdZvbGllYSIsInBhc3N3b3JkIjoiRGVjZW1icmUjEvIn0=' }\n```\n\n\n## Helper functions\n\n* `followProgress` - allows to fire a callback only in the end of a stream based process. (build, pull, ...)\n\n``` js\n//followProgress(stream, onFinished, [onProgress])\ndocker.pull(repoTag, function(err, stream) {\n  //...\n  docker.modem.followProgress(stream, onFinished, onProgress);\n\n  function onFinished(err, output) {\n    //output is an array with output json parsed objects\n    //...\n  }\n  function onProgress(event) {\n    //...\n  }\n});\n```\n\n* `demuxStream` - demux stdout and stderr\n\n``` js\n//demuxStream(stream, stdout, stderr)\ncontainer.attach({\n  stream: true,\n  stdout: true,\n  stderr: true\n}, function handler(err, stream) {\n  //...\n  container.modem.demuxStream(stream, process.stdout, process.stderr);\n  //...\n});\n```\n\n## Sponsors\n\nAmazing entities that [sponsor](https://github.com/sponsors/apocas) my open-source work. Check them out!\n\n[![HTTP Toolkit](https://avatars.githubusercontent.com/u/39777515?s=100)](https://github.com/httptoolkit)\n[![OOMOL - Oomol AI Studio](https://avatars.githubusercontent.com/u/146153906?s=100)](https://oomol.com)\n\n## Documentation\n\n### Docker\n\n- docker.createContainer(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ContainerCreate)\n- docker.createImage([auth], options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ImageCreate)\n- docker.loadImage(file, options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ImageLoad)\n- docker.importImage(file, options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ImageCreate)\n- docker.buildImage(file, options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ImageBuild)\n- docker.checkAuth(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/SystemAuth)\n- docker.getContainer(id) - Returns a Container object.\n- docker.getImage(name) - Returns an Image object.\n- docker.getVolume(name) - Returns a Volume object.\n- docker.getPlugin(name) - Returns a Plugin object.\n- docker.getService(id) - Returns a Service object.\n- docker.getTask(id) - Returns a Task object.\n- docker.getNode(id) - Returns a Node object.\n- docker.getNetwork(id) - Returns a Network object.\n- docker.getSecret(id) - Returns a Secret object.\n- docker.getConfig(id) - Returns a Config object.\n- docker.getExec(id) - Returns a Exec object.\n- docker.listContainers(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ContainerList)\n- docker.listImages(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ImageList)\n- docker.listServices(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ServiceList)\n- docker.listNodes(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/NodeList)\n- docker.listTasks(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/TaskList)\n- docker.listSecrets(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/SecretList)\n- docker.listConfigs(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ConfigList)\n- docker.listPlugins(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/PluginList)\n- docker.listVolumes(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/VolumeList)\n- docker.listNetworks(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/NetworkList)\n- docker.createSecret(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/SecretCreate)\n- docker.createConfig(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ConfigCreate)\n- docker.createPlugin(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/PluginCreate)\n- docker.createVolume(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/VolumeCreate)\n- docker.createService(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ServiceCreate)\n- docker.createNetwork(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/NetworkCreate)\n- docker.pruneImages(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ImagePrune)\n- docker.pruneBuilder() - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/BuildPrune)\n- docker.pruneContainers(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ContainerPrune)\n- docker.pruneVolumes(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/VolumePrune)\n- docker.pruneNetworks(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/NetworkPrune)\n- docker.searchImages(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ImageSearch)\n- docker.info() - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/SystemInfo)\n- docker.version() - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/SystemVersion)\n- docker.ping() - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/SystemPing)\n- docker.df() - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/SystemDataUsage)\n- docker.getEvents(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/SystemEvents)\n- docker.swarmInit(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/SwarmInit)\n- docker.swarmJoin(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/SwarmJoin)\n- docker.swarmLeave(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/SwarmLeave)\n- docker.swarmUpdate(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/SwarmUpdate)\n- docker.swarmInspect() - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/SwarmInspect)\n- docker.pull(repoTag, options, callback, auth) - Like Docker's CLI pull\n- docker.pullAll(repoTag, options, callback, auth) - Like Docker's CLI pull with \"-a\"\n- docker.run(image, cmd, stream, createOptions, startOptions) - Like Docker's CLI run\n\n\n### Container\n\n- container.inspect(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ContainerInspect)\n- container.rename(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ContainerRename)\n- container.update(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ContainerUpdate)\n- container.top(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ContainerTop)\n- container.changes() - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ContainerChanges)\n- container.export() - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ContainerExport)\n- container.start(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ContainerStart)\n- container.stop(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ContainerStop)\n- container.pause(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ContainerPause)\n- container.unpause(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ContainerUnpause)\n- container.exec(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ContainerExec)\n- container.commit(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ImageCommit)\n- container.restart(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ContainerRestart)\n- container.kill(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ContainerKill)\n- container.resize(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ContainerResize)\n- container.attach(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ContainerAttach)\n- container.wait(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ContainerWait)\n- container.remove(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ContainerDelete)\n- container.getArchive(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ContainerArchive)\n- container.infoArchive(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ContainerArchiveInfo)\n- container.putArchive(file, options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/PutContainerArchive)\n- container.logs(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ContainerLogs)\n- container.stats(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ContainerStats)\n\n### Exec\n\n- exec.start(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ExecStart)\n- exec.resize(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ExecResize)\n- exec.inspect() - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ExecInspect)\n\n### Image\n\n- image.inspect(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.48/#tag/Image/operation/ImageInspect)\n- image.history() - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ImageHistory)\n- image.push(options, callback, auth) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ImagePush)\n- image.tag(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ImageTag)\n- image.remove(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ImageDelete)\n- image.get() - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ImageGet)\n\n### Network\n\n- network.inspect() - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/NetworkInspect)\n- network.remove(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/NetworkDelete)\n- network.connect(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/NetworkConnect)\n- network.disconnect(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/NetworkDisconnect)\n\n### Node\n\n- node.inspect() - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/NodeInspect)\n- node.remove(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/NodeDelete)\n- node.update(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/NodeUpdate)\n\n### Plugin\n\n- plugin.privileges() - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/GetPluginPrivileges)\n- plugin.pull(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/PluginPull)\n- plugin.inspect() - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/PluginInspect)\n- plugin.remove(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/PluginDelete)\n- plugin.enable(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/PluginEnable)\n- plugin.disable(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/PluginDisable)\n- plugin.update([auth], options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/PluginUpgrade)\n- plugin.push(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/PluginPush)\n- plugin.configure(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/PluginSet)\n\n### Secret\n\n- secret.inspect() - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/SecretInspect)\n- secret.remove() - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/SecretDelete)\n- secret.update(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/SecretUpdate)\n\n### Service\n\n- service.inspect() - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ServiceInspect)\n- service.remove(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ServiceDelete)\n- service.update(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ServiceUpdate)\n- service.logs(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ServiceLogs)\n\n### Task\n\n- task.inspect() - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/TaskInspect)\n- task.logs(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/Session)\n\n### Volume\n\n- volume.inspect() - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/VolumeInspect)\n- volume.remove(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/VolumeDelete)\n\n\n## Tests\n\n * `docker pull ubuntu:latest` to prepare your system for the tests.\n * Tests are implemented using `mocha` and `chai`. Run them with `npm test`.\n\n## Examples\n\nCheck the examples folder for more specific use cases examples.\n\n## License\n\nPedro Dias - [@pedromdias](https://twitter.com/pedromdias)\n\nLicensed under the Apache license, version 2.0 (the \"license\"); You may not use this file except in compliance with the license. You may obtain a copy of the license at:\n\n    http://www.apache.org/licenses/LICENSE-2.0.html\n\nUnless required by applicable law or agreed to in writing, software distributed under the license is distributed on an \"as is\" basis, without warranties or conditions of any kind, either express or implied. See the license for the specific language governing permissions and limitations under the license.\n","funding_links":["https://github.com/sponsors/apocas"],"categories":["JavaScript","Development with Docker","Node.js","Dev Tools","nodejs"],"sub_categories":["API Client","docker"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapocas%2Fdockerode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapocas%2Fdockerode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapocas%2Fdockerode/lists"}