Comparing version 2.2.8 to 2.2.9
@@ -91,2 +91,3 @@ var EventEmitter = require('events').EventEmitter, | ||
file: file, | ||
isStream: true, | ||
statusCodes: { | ||
@@ -104,2 +105,34 @@ 200: true, | ||
/** | ||
* Import image from a tar archive | ||
* @param {String} file File | ||
* @param {Object} opts Options (optional) | ||
* @param {Function} callback Callback | ||
*/ | ||
Docker.prototype.importImage = function(file, opts, callback) { | ||
if (!callback && typeof opts === 'function') { | ||
callback = opts; | ||
opts = {}; | ||
} | ||
opts.fromSrc = '-' | ||
var self = this; | ||
var optsf = { | ||
path: '/images/create?', | ||
method: 'POST', | ||
options: opts, | ||
file: file, | ||
isStream: true, | ||
statusCodes: { | ||
200: true, | ||
500: 'server error' | ||
} | ||
}; | ||
this.modem.dial(optsf, function(err, data) { | ||
callback(err, data); | ||
}); | ||
}; | ||
/** | ||
* Verifies auth | ||
@@ -106,0 +139,0 @@ * @param {Object} opts Options |
{ | ||
"name": "dockerode", | ||
"description": "Docker Remote API module.", | ||
"version": "2.2.8", | ||
"version": "2.2.9", | ||
"author": "Pedro Dias <petermdias@gmail.com>", | ||
@@ -6,0 +6,0 @@ "maintainers": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
55530
1525