New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

docker.io

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

docker.io - npm Package Compare versions

Comparing version 0.9.4 to 0.9.5

11

lib/index.js

@@ -1,11 +0,1 @@

String.prototype.isJson = function() {
try {
JSON.parse(this);
} catch (e) {
return false;
}
return true;
};
var Endpoint = require('./endpoint'),

@@ -32,2 +22,3 @@ Modem = require('docker-modem'),

return {
demuxStream: modem.demuxStream;
containers: {

@@ -34,0 +25,0 @@ list: new Endpoint('options', {

2

package.json
{
"name": "docker.io",
"version": "0.9.4",
"version": "0.9.5",
"description": "wrapper for the docker.io REST interface",

@@ -5,0 +5,0 @@ "main": "./lib",

@@ -52,2 +52,22 @@ docker.io

### API calls (w/streams)
```javascript
//tty:true
docker.containers.attach('hi74y2i34yi23', {stream: true, stdout: true, stderr: true, tty: true}, function(err, stream) {
stream.pipe(process.stdout);
});
//tty:false
docker.containers.attach('hi74y2i34yi23', ({stream: true, stdout: true, stderr: true, tty: false}, function(err, stream) {
//http://docs.docker.io/en/latest/api/docker_remote_api_v1.7/#post--containers-(id)-attach
//dockerode may demultiplex the streams for you :)
container.modem.demuxStream(stream, process.stdout, process.stderr);
});
docker.image.create({fromImage: 'ubuntu'}, function(err, stream) {
stream.pipe(process.stdout);
});
```
## Contributing

@@ -54,0 +74,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