diff --git a/README.md b/README.md index 44d0877..5dd1421 100644 --- a/README.md +++ b/README.md @@ -14,8 +14,8 @@ Not another Node.js Docker Remote API module. ## Ecosystem - * docker-modem [https://github.com/apocas/docker-modem](https://github.com/apocas/docker-modem) - Docker's API network stack - * dockerode-compose [https://github.com/apocas/dockerode-compose](https://github.com/apocas/dockerode-compose) - docker-compose in Node.js +* docker-modem [https://github.com/apocas/docker-modem](https://github.com/apocas/docker-modem) - Docker's API network stack +* dockerode-compose [https://github.com/apocas/dockerode-compose](https://github.com/apocas/dockerode-compose) - docker-compose in Node.js ## Installation @@ -23,15 +23,15 @@ Not another Node.js Docker Remote API module. ## Usage - * Input options are directly passed to Docker. Check [Docker API documentation](https://docs.docker.com/engine/api/latest/) for more details. - * Return values are unchanged from Docker, official Docker documentation will also apply to them. - * Check the tests and examples folder for more examples. +* Input options are directly passed to Docker. Check [Docker API documentation](https://docs.docker.com/reference/api/engine/) for more details. +* Return values are unchanged from Docker, official Docker documentation will also apply to them. +* Check the tests and examples folder for more examples. ### Getting started To use `dockerode` first you need to instantiate it: -``` js +```js var Docker = require('dockerode'); var docker = new Docker({socketPath: '/var/run/docker.sock'}); var docker1 = new Docker(); //defaults to above if env variables are not used @@ -46,7 +46,7 @@ var docker5 = new Docker({ ca: fs.readFileSync('ca.pem'), cert: fs.readFileSync('cert.pem'), key: fs.readFileSync('key.pem'), - version: 'v1.25' // required when Docker >= v1.13, https://docs.docker.com/engine/api/version-history/ + version: 'v1.25' // required when Docker >= v1.13, https://docs.docker.com/reference/api/engine/version-history/ }); var docker6 = new Docker({ @@ -68,7 +68,7 @@ var docker7 = new Docker({ ### Manipulating a container: -``` js +```js // create a container entity. does not query API var container = docker.getContainer('71501a8ab0f8'); @@ -117,13 +117,13 @@ docker.createContainer({ You may also specify default options for each container's operations, which will always be used for the specified container and operation. -``` js +```js container.defaultOptions.start.Binds = ["/tmp:/tmp:rw"]; ``` ### Stopping all containers on a host -``` js +```js docker.listContainers(function (err, containers) { containers.forEach(function (containerInfo) { docker.getContainer(containerInfo.Id).stop(cb); @@ -132,9 +132,10 @@ docker.listContainers(function (err, containers) { ``` ### Building an Image -Context: 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. -``` js +Context: 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. + +```js docker.buildImage('archive.tar', {t: imageName}, function (err, response){ //... }); @@ -149,7 +150,7 @@ docker.buildImage({ `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: -``` js +```js let dockerode = new Dockerode(); let stream = await dockerode.buildImage(...); await new Promise((resolve, reject) => { @@ -158,10 +159,9 @@ await new Promise((resolve, reject) => { // Build has finished ``` - ### Creating a container: -``` js +```js docker.createContainer({Image: 'ubuntu', Cmd: ['/bin/bash'], name: 'ubuntu-test'}, function (err, container) { container.start(function (err, data) { //... @@ -172,7 +172,7 @@ docker.createContainer({Image: 'ubuntu', Cmd: ['/bin/bash'], name: 'ubuntu-test' ### Streams goodness: -``` js +```js //tty:true docker.createContainer({ /*...*/ Tty: true /*...*/ }, function(err, container) { @@ -205,7 +205,7 @@ docker.createImage({fromImage: 'ubuntu'}, function (err, stream) { //... ``` -There is also support for [HTTP connection hijacking](https://docs.docker.com/engine/api/v1.45/#tag/Container/operation/ContainerAttach), +There is also support for [HTTP connection hijacking](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Container/operation/ContainerAttach), which allows for cleaner interactions with commands that work with stdin and stdout separately. ```js @@ -232,11 +232,11 @@ docker.createContainer({Tty: false, /*... other options */}, function(err, conta * `image` - container image * `cmd` - command to be executed * `stream` - stream(s) which will be used for execution output. -* `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 -* `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 +* `create_options` - (optional) Options used for container creation. Refer to the [DockerEngine ContainerCreate documentation](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Container/operation/ContainerCreate) for the possible values +* `start_options` - (optional) Options used for container start. Refer to the [DockerEngine ContainerStart documentation](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Container/operation/ContainerStart) for the possible values * `callback` - callback called when execution ends (optional, promise will be returned if not used). -``` js +```js //callback docker.run('ubuntu', ['bash', '-c', 'uname -a'], process.stdout, function (err, data, container) { console.log(data.StatusCode); @@ -257,7 +257,7 @@ docker.run(testImage, ['bash', '-c', 'uname -a'], process.stdout).then(function( or, if you want to split stdout and stderr (you must to pass `Tty:false` as an option for this to work) -``` js +```js docker.run('ubuntu', ['bash', '-c', 'uname -a'], [process.stdout, process.stderr], {Tty:false}, function (err, data, container) { console.log(data.StatusCode); }); @@ -266,7 +266,7 @@ docker.run('ubuntu', ['bash', '-c', 'uname -a'], [process.stdout, process.stderr If you provide a callback, `run` will return an EventEmitter supporting the following events: container, stream, data. If a callback isn't provided a promise will be returned. -``` js +```js docker.run('ubuntu', ['bash', '-c', 'uname -a'], [process.stdout, process.stderr], {Tty:false}, function (err, data, container) { //... }).on('container', function (container) { @@ -276,7 +276,7 @@ docker.run('ubuntu', ['bash', '-c', 'uname -a'], [process.stdout, process.stderr And here is one more complex example using auto-remove and Docker network. -``` js +```js docker.run('some-python-image', ['python', 'main.py', arg], process.stdout, {name: 'my-python-container', HostConfig: { AutoRemove: true, NetworkMode: 'my_network'}}, function(err, data, container) { // Do stuff }); @@ -289,7 +289,7 @@ docker.run('some-python-image', ['python', 'main.py', arg], process.stdout, {nam * `options` - extra options passed to create image. * `callback` - callback called when execution ends. -``` js +```js docker.pull('myrepo/myname:tag', function (err, stream) { // streaming output from pull... }); @@ -299,7 +299,7 @@ docker.pull('myrepo/myname:tag', function (err, stream) { `docker-modem` already base64 encodes the necessary auth object for you. -``` js +```js var auth = { username: 'username', password: 'password', @@ -319,12 +319,11 @@ If you already have a base64 encoded auth object, you can use it directly: var auth = { key: 'yJ1J2ZXJhZGRyZXNzIjoitZSI6Im4OCIsImF1dGgiOiIiLCJlbWFpbCI6ImZvbGllLmFkcmc2VybmF0iLCJzZX5jb2aHR0cHM6Ly9pbmRleC5kb2NrZXIuaW8vdZvbGllYSIsInBhc3N3b3JkIjoiRGVjZW1icmUjEvIn0=' } ``` - ## Helper functions * `followProgress` - allows to fire a callback only in the end of a stream based process. (build, pull, ...) -``` js +```js //followProgress(stream, onFinished, [onProgress]) docker.pull(repoTag, function(err, stream) { //... @@ -342,7 +341,7 @@ docker.pull(repoTag, function(err, stream) { * `demuxStream` - demux stdout and stderr -``` js +```js //demuxStream(stream, stdout, stderr) container.attach({ stream: true, @@ -366,154 +365,152 @@ Amazing entities that [sponsor](https://github.com/sponsors/apocas) my open-sour ### Docker -- docker.createContainer(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ContainerCreate) -- docker.createImage([auth], options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ImageCreate) -- docker.loadImage(file, options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ImageLoad) -- docker.importImage(file, options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ImageCreate) -- docker.buildImage(file, options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ImageBuild) -- docker.checkAuth(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/SystemAuth) -- docker.getContainer(id) - Returns a Container object. -- docker.getImage(name) - Returns an Image object. -- docker.getVolume(name) - Returns a Volume object. -- docker.getPlugin(name) - Returns a Plugin object. -- docker.getService(id) - Returns a Service object. -- docker.getTask(id) - Returns a Task object. -- docker.getNode(id) - Returns a Node object. -- docker.getNetwork(id) - Returns a Network object. -- docker.getSecret(id) - Returns a Secret object. -- docker.getConfig(id) - Returns a Config object. -- docker.getExec(id) - Returns a Exec object. -- docker.listContainers(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ContainerList) -- docker.listImages(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ImageList) -- docker.listServices(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ServiceList) -- docker.listNodes(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/NodeList) -- docker.listTasks(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/TaskList) -- docker.listSecrets(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/SecretList) -- docker.listConfigs(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ConfigList) -- docker.listPlugins(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/PluginList) -- docker.listVolumes(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/VolumeList) -- docker.listNetworks(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/NetworkList) -- docker.createSecret(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/SecretCreate) -- docker.createConfig(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ConfigCreate) -- docker.createPlugin(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/PluginCreate) -- docker.createVolume(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/VolumeCreate) -- docker.createService(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ServiceCreate) -- docker.createNetwork(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/NetworkCreate) -- docker.pruneImages(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ImagePrune) -- docker.pruneBuilder() - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/BuildPrune) -- docker.pruneContainers(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ContainerPrune) -- docker.pruneVolumes(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/VolumePrune) -- docker.pruneNetworks(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/NetworkPrune) -- docker.searchImages(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ImageSearch) -- docker.info() - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/SystemInfo) -- docker.version() - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/SystemVersion) -- docker.ping() - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/SystemPing) -- docker.df() - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/SystemDataUsage) -- docker.getEvents(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/SystemEvents) -- docker.swarmInit(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/SwarmInit) -- docker.swarmJoin(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/SwarmJoin) -- docker.swarmLeave(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/SwarmLeave) -- docker.swarmUpdate(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/SwarmUpdate) -- docker.swarmInspect() - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/SwarmInspect) -- docker.pull(repoTag, options, callback, auth) - Like Docker's CLI pull -- docker.pullAll(repoTag, options, callback, auth) - Like Docker's CLI pull with "-a" -- docker.run(image, cmd, stream, createOptions, startOptions) - Like Docker's CLI run - +* docker.createContainer(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Container/operation/ContainerCreate) +* docker.createImage([auth], options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Image/operation/ImageCreate) +* docker.loadImage(file, options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Image/operation/ImageLoad) +* docker.importImage(file, options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Image/operation/ImageCreate) +* docker.buildImage(file, options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Build/operation/ImageBuild) +* docker.checkAuth(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/System/operation/SystemAuth) +* docker.getContainer(id) - Returns a Container object. +* docker.getImage(name) - Returns an Image object. +* docker.getVolume(name) - Returns a Volume object. +* docker.getPlugin(name) - Returns a Plugin object. +* docker.getService(id) - Returns a Service object. +* docker.getTask(id) - Returns a Task object. +* docker.getNode(id) - Returns a Node object. +* docker.getNetwork(id) - Returns a Network object. +* docker.getSecret(id) - Returns a Secret object. +* docker.getConfig(id) - Returns a Config object. +* docker.getExec(id) - Returns a Exec object. +* docker.listContainers(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Container/operation/ContainerList) +* docker.listImages(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Image/operation/ImageList) +* docker.listServices(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Service/operation/ServiceList) +* docker.listNodes(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Node/operation/NodeList) +* docker.listTasks(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Task/operation/TaskList) +* docker.listSecrets(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Secret/operation/SecretList) +* docker.listConfigs(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Config/operation/ConfigList) +* docker.listPlugins(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Plugin/operation/PluginList) +* docker.listVolumes(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Volume/operation/VolumeList) +* docker.listNetworks(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Network/operation/NetworkList) +* docker.createSecret(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Secret/operation/SecretCreate) +* docker.createConfig(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Config/operation/ConfigCreate) +* docker.createPlugin(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Plugin/operation/PluginCreate) +* docker.createVolume(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Volume/operation/VolumeCreate) +* docker.createService(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Service/operation/ServiceCreate) +* docker.createNetwork(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Network/operation/NetworkCreate) +* docker.pruneImages(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Image/operation/ImagePrune) +* docker.pruneBuilder() - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Build/operation/BuildPrune) +* docker.pruneContainers(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Container/operation/ContainerPrune) +* docker.pruneVolumes(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Volume/operation/VolumePrune) +* docker.pruneNetworks(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Network/operation/NetworkPrune) +* docker.searchImages(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Image/operation/ImageSearch) +* docker.info() - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/System/operation/SystemInfo) +* docker.version() - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/System/operation/SystemVersion) +* docker.ping() - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/System/operation/SystemPing) +* docker.df() - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/System/operation/SystemDataUsage) +* docker.getEvents(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/System/operation/SystemEvents) +* docker.swarmInit(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Swarm/operation/SwarmInit) +* docker.swarmJoin(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Swarm/operation/SwarmJoin) +* docker.swarmLeave(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Swarm/operation/SwarmLeave) +* docker.swarmUpdate(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Swarm/operation/SwarmUpdate) +* docker.swarmInspect() - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Swarm/operation/SwarmInspect) +* docker.pull(repoTag, options, callback, auth) - Like Docker's CLI pull +* docker.pullAll(repoTag, options, callback, auth) - Like Docker's CLI pull with "-a" +* docker.run(image, cmd, stream, createOptions, startOptions) - Like Docker's CLI run ### Container -- container.inspect(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ContainerInspect) -- container.rename(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ContainerRename) -- container.update(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ContainerUpdate) -- container.top(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ContainerTop) -- container.changes() - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ContainerChanges) -- container.export() - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ContainerExport) -- container.start(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ContainerStart) -- container.stop(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ContainerStop) -- container.pause(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ContainerPause) -- container.unpause(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ContainerUnpause) -- container.exec(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ContainerExec) -- container.commit(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ImageCommit) -- container.restart(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ContainerRestart) -- container.kill(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ContainerKill) -- container.resize(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ContainerResize) -- container.attach(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ContainerAttach) -- container.wait(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ContainerWait) -- container.remove(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ContainerDelete) -- container.getArchive(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ContainerArchive) -- container.infoArchive(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ContainerArchiveInfo) -- container.putArchive(file, options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/PutContainerArchive) -- container.logs(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ContainerLogs) -- container.stats(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ContainerStats) +* container.inspect(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Container/operation/ContainerInspect) +* container.rename(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Container/operation/ContainerRename) +* container.update(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Container/operation/ContainerUpdate) +* container.top(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Container/operation/ContainerTop) +* container.changes() - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Container/operation/ContainerChanges) +* container.export() - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Container/operation/ContainerExport) +* container.start(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Container/operation/ContainerStart) +* container.stop(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Container/operation/ContainerStop) +* container.pause(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Container/operation/ContainerPause) +* container.unpause(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Container/operation/ContainerUnpause) +* container.exec(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Exec/operation/ContainerExec) +* container.commit(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Image/operation/ImageCommit) +* container.restart(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Container/operation/ContainerRestart) +* container.kill(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Container/operation/ContainerKill) +* container.resize(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Container/operation/ContainerResize) +* container.attach(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Container/operation/ContainerAttach) +* container.wait(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Container/operation/ContainerWait) +* container.remove(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Container/operation/ContainerDelete) +* container.getArchive(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Container/operation/ContainerArchive) +* container.infoArchive(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Container/operation/ContainerArchiveInfo) +* container.putArchive(file, options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Container/operation/PutContainerArchive) +* container.logs(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Container/operation/ContainerLogs) +* container.stats(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Container/operation/ContainerStats) ### Exec -- exec.start(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ExecStart) -- exec.resize(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ExecResize) -- exec.inspect() - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ExecInspect) +* exec.start(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Exec/operation/ExecStart) +* exec.resize(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Exec/operation/ExecResize) +* exec.inspect() - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Exec/operation/ExecInspect) ### Image -- image.inspect(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.48/#tag/Image/operation/ImageInspect) -- image.history() - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ImageHistory) -- image.push(options, callback, auth) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ImagePush) -- image.tag(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ImageTag) -- image.remove(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ImageDelete) -- image.get() - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ImageGet) +* image.inspect(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Image/operation/ImageInspect) +* image.history() - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Image/operation/ImageHistory) +* image.push(options, callback, auth) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Image/operation/ImagePush) +* image.tag(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Image/operation/ImageTag) +* image.remove(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Image/operation/ImageDelete) +* image.get() - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Image/operation/ImageGet) ### Network -- network.inspect() - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/NetworkInspect) -- network.remove(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/NetworkDelete) -- network.connect(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/NetworkConnect) -- network.disconnect(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/NetworkDisconnect) +* network.inspect() - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Network/operation/NetworkInspect) +* network.remove(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Network/operation/NetworkDelete) +* network.connect(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Network/operation/NetworkConnect) +* network.disconnect(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Network/operation/NetworkDisconnect) ### Node -- node.inspect() - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/NodeInspect) -- node.remove(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/NodeDelete) -- node.update(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/NodeUpdate) +* node.inspect() - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Node/operation/NodeInspect) +* node.remove(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Node/operation/NodeDelete) +* node.update(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Node/operation/NodeUpdate) ### Plugin -- plugin.privileges() - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/GetPluginPrivileges) -- plugin.pull(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/PluginPull) -- plugin.inspect() - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/PluginInspect) -- plugin.remove(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/PluginDelete) -- plugin.enable(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/PluginEnable) -- plugin.disable(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/PluginDisable) -- plugin.update([auth], options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/PluginUpgrade) -- plugin.push(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/PluginPush) -- plugin.configure(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/PluginSet) +* plugin.privileges() - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Plugin/operation/GetPluginPrivileges) +* plugin.pull(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Plugin/operation/PluginPull) +* plugin.inspect() - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Plugin/operation/PluginInspect) +* plugin.remove(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Plugin/operation/PluginDelete) +* plugin.enable(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Plugin/operation/PluginEnable) +* plugin.disable(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Plugin/operation/PluginDisable) +* plugin.update([auth], options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Plugin/operation/PluginUpgrade) +* plugin.push(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Plugin/operation/PluginPush) +* plugin.configure(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Plugin/operation/PluginSet) ### Secret -- secret.inspect() - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/SecretInspect) -- secret.remove() - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/SecretDelete) -- secret.update(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/SecretUpdate) +* secret.inspect() - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Secret/operation/SecretInspect) +* secret.remove() - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Secret/operation/SecretDelete) +* secret.update(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Secret/operation/SecretUpdate) ### Service -- service.inspect() - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ServiceInspect) -- service.remove(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ServiceDelete) -- service.update(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ServiceUpdate) -- service.logs(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ServiceLogs) +* service.inspect() - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Service/operation/ServiceInspect) +* service.remove(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Service/operation/ServiceDelete) +* service.update(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Service/operation/ServiceUpdate) +* service.logs(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Service/operation/ServiceLogs) ### Task -- task.inspect() - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/TaskInspect) -- task.logs(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/Session) +* task.inspect() - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Task/operation/TaskInspect) +* task.logs(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Task/operation/TaskLogs) ### Volume -- volume.inspect() - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/VolumeInspect) -- volume.remove(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/VolumeDelete) - +* volume.inspect() - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Volume/operation/VolumeInspect) +* volume.remove(options) - [Docker API Endpoint](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Volume/operation/VolumeDelete) ## Tests - * `docker pull ubuntu:latest` to prepare your system for the tests. - * Tests are implemented using `mocha` and `chai`. Run them with `npm test`. +* `docker pull ubuntu:latest` to prepare your system for the tests. +* Tests are implemented using `mocha` and `chai`. Run them with `npm test`. ## Examples @@ -525,6 +522,8 @@ Pedro Dias - [@pedromdias](https://twitter.com/pedromdias) Licensed 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: - http://www.apache.org/licenses/LICENSE-2.0.html +``` +http://www.apache.org/licenses/LICENSE-2.0.html +``` -Unless 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. +Unless 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. \ No newline at end of file