New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

dockerode

Package Overview
Dependencies
Maintainers
0
Versions
92
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 4.0.2 to 4.0.3

.vscode/launch.json

73

lib/docker.js

@@ -15,2 +15,3 @@ var EventEmitter = require('events').EventEmitter,

util = require('./util'),
withSession = require('./session');
extend = util.extend;

@@ -291,21 +292,42 @@

if (callback === undefined) {
return new self.modem.Promise(function(resolve, reject) {
util.prepareBuildContext(file, (ctx) => {
optsf.file = ctx;
self.modem.dial(optsf, function(err, data) {
if (err) {
return reject(err);
function dial(callback) {
util.prepareBuildContext(file, (ctx) => {
optsf.file = ctx;
self.modem.dial(optsf, callback);
});
}
function dialWithSession(callback) {
if (opts?.version === "2") {
withSession(self, optsf.authconfig,(err, sessionId, done) => {
if (err) {
return callback(err);
}
optsf.options.session = sessionId;
dial((err, data) => {
callback(err, data);
if (data) {
data.on("end", done);
}
resolve(data);
});
});
} else {
dial(callback);
}
}
if (callback === undefined) {
return new self.modem.Promise(function (resolve, reject) {
dialWithSession(function (err, data) {
if (err) {
return reject(err);
}
resolve(data);
});
});
} else {
util.prepareBuildContext(file, (ctx) => {
optsf.file = ctx;
self.modem.dial(optsf, function(err, data) {
callback(err, data);
});
})
dialWithSession(callback);
}

@@ -1471,2 +1493,23 @@ };

/**
* PullAll is a wrapper around createImage, to pull all image tags of an image.
* @param {String} repoTag Repository tag
* @param {Object} opts Options (optional)
* @param {Function} callback Callback
* @param {Object} auth Authentication (optional)
* @return {Object} Image
*/
Docker.prototype.pullAll = function(repoTag, opts, callback, auth) {
var args = util.processArgs(opts, callback);
var imageSrc = util.parseRepositoryTag(repoTag);
args.opts.fromImage = imageSrc.repository;
var argsf = [args.opts, args.callback];
if (auth) {
argsf = [auth, args.opts, args.callback];
}
return this.createImage.apply(this, argsf);
};
/**
* Like run command from Docker's CLI

@@ -1835,2 +1878,2 @@ * @param {String} image Image name to be used.

module.exports = Docker;
module.exports = Docker;

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

var optsf = {
path: '/plugins/' + this.name,
path: '/plugins/' + this.name + '/json',
method: 'GET',

@@ -303,2 +303,3 @@ abortSignal: args.opts.abortSignal,

200: true,
204: true,
404: 'plugin not installed',

@@ -305,0 +306,0 @@ 500: 'server error'

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

@@ -19,4 +19,8 @@ "maintainers": [

"@balena/dockerignore": "^1.0.2",
"docker-modem": "^5.0.3",
"tar-fs": "~2.0.1"
"@grpc/grpc-js": "^1.11.1",
"@grpc/proto-loader": "^0.7.13",
"docker-modem": "^5.0.5",
"protobufjs": "^7.3.2",
"tar-fs": "~2.0.1",
"uuid": "^10.0.0"
},

@@ -23,0 +27,0 @@ "devDependencies": {

@@ -208,3 +208,3 @@ # dockerode

There is also support for [HTTP connection hijacking](https://docs.docker.com/engine/api/v1.22/#32-hijacking),
There is also support for [HTTP connection hijacking](https://docs.docker.com/engine/api/v1.45/#tag/Container/operation/ContainerAttach),
which allows for cleaner interactions with commands that work with stdin and stdout separately.

@@ -419,2 +419,3 @@

- 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

@@ -421,0 +422,0 @@

Sorry, the diff of this file is not supported yet

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