Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dockerode-process

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dockerode-process - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

LICENSE

35

docker_process_test.js
suite('docker process', function() {
var DockerRun = require('./');
var docker = require('./test/docker')();
var subject;
teardown(function() {
return subject && subject.remove();
});
suite('emits container', function() {
setup(function() {
subject = new DockerRun(docker, {
create: {
Image: 'ubuntu',
Cmd: ['/bin/bash', '-c', 'echo stdout && echo stderr >&2'],
Tty: true
},
start: {}
});
});
test('once emitted', function(done) {
subject.once('container', function(container) {
assert.ok(subject.container, 'has container');
assert.equal(subject.container, container);
done();
});
subject.run();
});
});
suite('#run - with pull', function() {
var subject;
setup(function() {

@@ -35,3 +63,2 @@ subject = new DockerRun(docker, {

suite('#run - with tty', function() {
var subject;
setup(function() {

@@ -65,3 +92,2 @@ subject = new DockerRun(docker, {

suite('#run - without tty (no pull)', function() {
var subject;
setup(function() {

@@ -117,3 +143,2 @@ subject = new DockerRun(docker, {

suite('#remove', function() {
var subject;
setup(function() {

@@ -138,2 +163,4 @@ subject = new DockerRun(docker, {

function() {
// set subject to null to avoid multiple remove's
subject = null;
// yey it works

@@ -140,0 +167,0 @@ }

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

this.container = container = docker.getContainer(_container.id);
this.emit('container', container);
return container.attach(attachConfig);

@@ -88,0 +89,0 @@ }.bind(this)

2

package.json
{
"name": "dockerode-process",
"version": "0.1.0",
"version": "0.2.0",
"description": "ChildProcess like interface for docker containers",

@@ -5,0 +5,0 @@ "main": "docker_process.js",

@@ -87,2 +87,8 @@

dockerProc.run();
// a reference to the container can be obtained by waiting for the
// container event
dockerProc.once('container', function(container) {
});
dockerProc.stdout.pipe(process.stdout);

@@ -89,0 +95,0 @@ dockerProc.once('exit', function(code) {

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