Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
azk / usr / lib / azk / node_modules / dockerode / examples / external_volume.js
Size: Mime:
var Docker = require('dockerode');

var docker = new Docker({socketPath: '/var/run/docker.sock'});

docker.createContainer({ Image: 'ubuntu', Cmd: ['/bin/ls','/stuff'], "Volumes":{"/stuff": {}} }, function (err, container) {
  container.attach({stream: true, stdout: true, stderr: true, tty: true}, function (err, stream) {
    stream.pipe(process.stdout);

    container.start({"Binds":["/home/vagrant:/stuff"]}, function (err, data) {
      console.log(data);
    });
  });
});