Socket
Socket
Sign inDemoInstall

dockerode

Package Overview
Dependencies
Maintainers
1
Versions
90
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dockerode - npm Package Compare versions

Comparing version 2.5.8 to 3.0.0

5

lib/config.js

@@ -53,3 +53,3 @@ var util = require('./util');

*
* @param {object} options
* @param {object} opts
* @param {function} callback

@@ -81,4 +81,3 @@ */

}
self.output = data;
resolve(self);
resolve(data);
});

@@ -85,0 +84,0 @@ });

37

lib/container.js

@@ -43,3 +43,3 @@ var extend = require('./util').extend,

* Inspect
* @param {Options} opts Options (optional)
* @param {Object} opts Options (optional)
* @param {Function} callback Callback, if supplied will query Docker.

@@ -106,4 +106,3 @@ * @return {Object} ID only and only if callback isn't supplied.

}
self.output = data;
resolve(self);
resolve(data);
});

@@ -146,4 +145,3 @@ });

}
self.output = data;
resolve(self);
resolve(data);
});

@@ -160,3 +158,3 @@ });

* Top
* @param {Object} Options like 'ps_args' (optional)
* @param {Object} opts like 'ps_args' (optional)
* @param {Function} callback Callback

@@ -291,4 +289,3 @@ */

}
self.output = data;
resolve(self);
resolve(data);
});

@@ -331,4 +328,3 @@ });

}
self.output = data;
resolve(self);
resolve(data);
});

@@ -405,4 +401,3 @@ });

}
self.output = data;
resolve(self);
resolve(data);
});

@@ -443,4 +438,3 @@ });

}
self.output = data;
resolve(self);
resolve(data);
});

@@ -482,4 +476,3 @@ });

}
self.output = data;
resolve(self);
resolve(data);
});

@@ -601,4 +594,3 @@ });

}
self.output = data;
resolve(self);
resolve(data);
});

@@ -640,4 +632,3 @@ });

}
self.output = data;
resolve(self);
resolve(data);
});

@@ -679,4 +670,3 @@ });

}
self.output = data;
resolve(self);
resolve(data);
});

@@ -718,4 +708,3 @@ });

}
self.output = data;
resolve(self);
resolve(data);
});

@@ -722,0 +711,0 @@ });

@@ -304,3 +304,22 @@ var EventEmitter = require('events').EventEmitter,

});
return build(pack.pipe(zlib.createGzip()));
if (callback === undefined) {
return new self.modem.Promise(function(resolve, reject) {
pack.on('error', function(error) {
return reject(error);
});
pack.on('end', function() {
return resolve(build(stream));
});
var stream = pack.pipe(zlib.createGzip());
});
} else {
pack.on('error', function(error) {
return callback(error);
});
pack.on('end', function() {
return build(stream);
});
var stream = pack.pipe(zlib.createGzip());
}
} else {

@@ -401,3 +420,3 @@ return build(file);

* Lists containers
* @param {Options} opts Options (optional)
* @param {Object} opts Options (optional)
* @param {Function} callback Callback

@@ -438,3 +457,3 @@ */

* Lists images
* @param {Options} opts Options (optional)
* @param {Object} opts Options (optional)
* @param {Function} callback Callback

@@ -475,2 +494,3 @@ */

* Lists Services
* @param {Object} opts
* @param {Function} callback Callback

@@ -510,2 +530,3 @@ */

* Lists Nodes
* @param {Object} opts
* @param {Function} callback Callback

@@ -548,2 +569,3 @@ */

* Lists Tasks
* @param {Object} opts
* @param {Function} callback Callback

@@ -663,2 +685,3 @@ */

* Lists secrets
* @param {Object} opts
* @param {Function} callback Callback

@@ -698,2 +721,3 @@ */

* Lists configs
* @param {Object} opts
* @param {Function} callback Callback

@@ -771,2 +795,3 @@ */

* Lists plugins
* @param {Object} opts
* @param {Function} callback Callback

@@ -806,3 +831,3 @@ */

* Prune images
* @param {Options} opts Options (optional)
* @param {Object} opts Options (optional)
* @param {Function} callback Callback

@@ -874,3 +899,3 @@ */

* Prune containers
* @param {Options} opts Options (optional)
* @param {Object} opts Options (optional)
* @param {Function} callback Callback

@@ -910,3 +935,3 @@ */

* Prune volumes
* @param {Options} opts Options (optional)
* @param {Object} opts Options (optional)
* @param {Function} callback Callback

@@ -946,3 +971,3 @@ */

* Prune networks
* @param {Options} opts Options (optional)
* @param {Object} opts Options (optional)
* @param {Function} callback Callback

@@ -1020,2 +1045,3 @@ */

* Creates a new service
* @param {Object} auth
* @param {Object} opts Create options

@@ -1067,3 +1093,3 @@ * @param {Function} callback Callback

* Lists volumes
* @param {Options} opts Options (optional)
* @param {Object} opts Options (optional)
* @param {Function} callback Callback

@@ -1142,3 +1168,3 @@ */

* Lists networkss
* @param {Options} opts Options (optional)
* @param {Object} opts Options (optional)
* @param {Function} callback Callback

@@ -1386,3 +1412,3 @@ */

args.opts.fromImage = imageSrc.repository;
args.opts.tag = imageSrc.tag;
args.opts.tag = imageSrc.tag || 'latest';

@@ -1549,7 +1575,6 @@ var argsf = [args.opts, args.callback];

return containero.start(startOptions);
}).then(function(container) {
return container.wait();
}).then(function(data) {
containero.output = data;
resolve(containero);
return containero.wait();
}).then(function(data) {
resolve([data, containero]);
}).catch(function(err) {

@@ -1564,3 +1589,3 @@ reject(err);

*
* @param {object} options
* @param {object} opts
* @param {function} callback

@@ -1602,3 +1627,3 @@ */

*
* @param {object} options
* @param {object} opts
* @param {function} callback

@@ -1640,2 +1665,3 @@ */

*
* @param {object} opts
* @param {function} callback

@@ -1676,2 +1702,3 @@ */

*
* @param {object} opts
* @param {function} callback

@@ -1678,0 +1705,0 @@ */

@@ -18,3 +18,3 @@ var util = require('./util');

*
* @param {object} options
* @param {object} opts
* @param {function} callback

@@ -50,4 +50,3 @@ */

}
self.output = data;
resolve(self);
resolve(data);
});

@@ -66,3 +65,3 @@ });

*
* @param {object} options
* @param {object} opts
* @param {function} callback

@@ -91,4 +90,3 @@ */

}
self.output = data;
resolve(self);
resolve(data);
});

@@ -95,0 +93,0 @@ });

@@ -52,2 +52,3 @@ var util = require('./util');

* Distribution
* @param {Object} opts
* @param {Function} callback Callback, if specified Docker will be queried.

@@ -225,4 +226,3 @@ * @return {Object} Name only if callback isn't specified.

}
self.output = data;
resolve(self);
resolve(data);
});

@@ -229,0 +229,0 @@ });

@@ -116,4 +116,3 @@ var util = require('./util');

}
self.output = data;
resolve(self);
resolve(data);
});

@@ -156,4 +155,3 @@ });

}
self.output = data;
resolve(self);
resolve(data);
});

@@ -160,0 +158,0 @@ });

@@ -18,3 +18,2 @@ var util = require('./util');

*
* @param {object} options
* @param {function} callback

@@ -55,3 +54,3 @@ */

*
* @param {object} options
* @param {object} opts
* @param {function} callback

@@ -83,4 +82,3 @@ */

}
self.output = data;
resolve(self);
resolve(data);
});

@@ -100,3 +98,3 @@ });

*
* @param {object} options
* @param {object} opts
* @param {function} callback

@@ -103,0 +101,0 @@ */

@@ -193,4 +193,3 @@ var util = require('./util');

}
self.output = data;
resolve(self);
resolve(data);
});

@@ -230,4 +229,3 @@ });

}
self.output = data;
resolve(self);
resolve(data);
});

@@ -304,4 +302,3 @@ });

}
self.output = data;
resolve(self);
resolve(data);
});

@@ -320,3 +317,4 @@ });

*
* @param {object} options
* @param {object} auth
* @param {object} opts
* @param {function} callback

@@ -351,4 +349,3 @@ */

}
self.output = data;
resolve(self);
resolve(data);
});

@@ -355,0 +352,0 @@ });

@@ -53,3 +53,3 @@ var util = require('./util');

*
* @param {object} options
* @param {object} opts
* @param {function} callback

@@ -80,4 +80,3 @@ */

}
self.output = data;
resolve(self);
resolve(data);
});

@@ -84,0 +83,0 @@ });

@@ -87,3 +87,4 @@ var util = require('./util');

*
* @param {object} options
* @param {object} auth
* @param {object} opts
* @param {function} callback

@@ -123,4 +124,3 @@ */

}
self.output = data;
resolve(self);
resolve(data);
});

@@ -127,0 +127,0 @@ });

@@ -22,3 +22,2 @@ var util = require('./util');

*
* @param {object} options
* @param {function} callback

@@ -25,0 +24,0 @@ */

{
"name": "dockerode",
"description": "Docker Remote API module.",
"version": "2.5.8",
"version": "3.0.0",
"author": "Pedro Dias <petermdias@gmail.com>",

@@ -18,8 +18,8 @@ "maintainers": [

"dependencies": {
"concat-stream": "~1.6.2",
"docker-modem": "^1.0.8",
"tar-fs": "~1.16.3"
"concat-stream": "~2.0.0",
"docker-modem": "^1.0.9",
"tar-fs": "~2.0.0"
},
"devDependencies": {
"bluebird": "^3.5.3",
"bluebird": "^3.5.5",
"chai": "~4.1.0",

@@ -26,0 +26,0 @@ "memorystream": "~0.3.0",

@@ -85,2 +85,3 @@ # dockerode [![Build Status](https://travis-ci.org/apocas/dockerode.svg?branch=master)](https://travis-ci.org/apocas/dockerode)

// promises are supported
var auxContainer;
docker.createContainer({

@@ -96,13 +97,14 @@ Image: 'ubuntu',

}).then(function(container) {
return container.start();
}).then(function(container) {
return container.resize({
auxContainer = container;
return auxContainer.start();
}).then(function(data) {
return auxContainer.resize({
h: process.stdout.rows,
w: process.stdout.columns
});
}).then(function(container) {
return container.stop();
}).then(function(container) {
return container.remove();
}).then(function(data) {
return auxContainer.stop();
}).then(function(data) {
return auxContainer.remove();
}).then(function(data) {
console.log('container removed');

@@ -181,3 +183,3 @@ }).catch(function(err) {

/* ... */
}
});

@@ -195,3 +197,3 @@ //tty:false

/* ... */
}
});

@@ -216,7 +218,7 @@ docker.createImage({fromImage: 'ubuntu'}, function (err, stream) {

// close the write-side of the stream without also closing the read-side!
fs.createReadStream('node-v5.1.0.tgz', 'binary').pipe(stream.output);
fs.createReadStream('node-v5.1.0.tgz', 'binary').pipe(stream);
// Fortunately, we have a regular TCP socket now, so when the readstream finishes and closes our
// stream, it is still open for reading and we will still get our results :-)
docker.modem.demuxStream(stream.output, process.stdout, process.stderr);
docker.modem.demuxStream(stream, process.stdout, process.stderr);
});

@@ -244,4 +246,6 @@ });

//promise
docker.run(testImage, ['bash', '-c', 'uname -a'], process.stdout).then(function(container) {
console.log(container.output.StatusCode);
docker.run(testImage, ['bash', '-c', 'uname -a'], process.stdout).then(function(data) {
var output = data[0];
var container = data[1];
console.log(output.StatusCode);
return container.remove();

@@ -440,3 +444,3 @@ }).then(function(data) {

- 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.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)

@@ -443,0 +447,0 @@ - image.remove(options) - [Docker API Endpoint](https://docs.docker.com/engine/api/v1.37/#operation/ImageDelete)

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc