How to use the dockerode/lib/util.processArgs function in dockerode

To help you get started, we’ve selected a few dockerode examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ProboCI / probo / lib / _patchDockerodeInspect.js View on Github external
Container.prototype.inspect = function(opts, callback) {
  var args = util.processArgs(opts, callback);

  if (typeof args.callback === 'function') {
    var optsf = {
      path: '/containers/' + this.id + '/json?',
      method: 'GET',
      options: args.opts,
      statusCodes: {
        200: true,
        404: 'no such container',
        500: 'server error',
      },
    };

    this.modem.dial(optsf, function(err, data) {
      args.callback(err, data);
    });