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

dockerode

Package Overview
Dependencies
Maintainers
1
Versions
90
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 2.2.5 to 2.2.6

1

lib/container.js

@@ -397,2 +397,3 @@ var extend = require('./util').extend,

isStream: true,
hijack: args.opts.hijack,
openStdin: args.opts.stdin,

@@ -399,0 +400,0 @@ statusCodes: {

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

isStream: true,
hijack: args.opts.hijack,
openStdin: args.opts.stdin,

@@ -28,0 +29,0 @@ statusCodes: {

2

package.json
{
"name": "dockerode",
"description": "Docker Remote API module.",
"version": "2.2.5",
"version": "2.2.6",
"author": "Pedro Dias <petermdias@gmail.com>",

@@ -6,0 +6,0 @@ "maintainers": [

@@ -152,2 +152,22 @@ # dockerode

There is also support for [HTTP connection hijacking](https://docs.docker.com/engine/reference/api/docker_remote_api_v1.22/#3-2-hijacking),
which allows for cleaner interactions with commands that work with stdin and stdout separately.
```js
docker.createContainer({Tty: false, /*... other options */}, function(err, container) {
container.exec({Cmd: ['shasum', '-'], AttachStdin: true, AttachStdout: true}, function(err, exec) {
exec.start({hijack: true, stdin: true}, function(err, stream) {
// shasum can't finish until after its stdin has been closed, telling it that it has
// read all the bytes it needs to sum. Without a socket upgrade, there is no way to
// close the write-side of the stream without also closing the read-side!
fs.createReadStream('node-v5.1.0.tgz', 'binary').pipe(stream);
// Fortunately, we have a regular TCP socket now, so when the readstream finishes and closes our
// stream, it is still open for reading and we will still get our results :-)
docker.modem.demuxStream(stream, process.stdout, process.stderr);
});
});
});
```
### Equivalent of `docker run` in `dockerode`:

@@ -154,0 +174,0 @@

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