node-docker-api
Advanced tools
Comparing version 1.1.13 to 1.1.14
{ | ||
"name": "node-docker-api", | ||
"version": "1.1.13", | ||
"version": "1.1.14", | ||
"description": "Docker Remote API driver for node", | ||
@@ -5,0 +5,0 @@ "main": "./lib/docker", |
@@ -26,2 +26,4 @@ # docker-api | ||
You can find more into the [examples folder](https://github.com/AgustinCB/docker-api/tree/master/examples) | ||
### Create, start, stop, restart and remove a container | ||
@@ -32,3 +34,3 @@ | ||
let docker = new Docker({ socketPath: '/var/run/docker.sock' }) | ||
const docker = new Docker({ socketPath: '/var/run/docker.sock' }) | ||
@@ -51,3 +53,3 @@ docker.container.create({ | ||
let docker = new Docker({ socketPath: '/var/run/docker.sock' }) | ||
const docker = new Docker({ socketPath: '/var/run/docker.sock' }) | ||
@@ -68,3 +70,3 @@ // List | ||
let docker = new Docker({ socketPath: '/var/run/docker.sock' }) | ||
const docker = new Docker({ socketPath: '/var/run/docker.sock' }) | ||
@@ -77,3 +79,3 @@ // List | ||
.then((stats) => { | ||
stats.on('data', (stat) => console.log('Stats: ',stat)) | ||
stats.on('data', (stat) => console.log('Stats: ', stat.toString())) | ||
stats.on('error', (err) => console.log('Error: ', err)) | ||
@@ -89,3 +91,3 @@ }) | ||
let docker = new Docker({ socketPath: '/var/run/docker.sock' }) | ||
const docker = new Docker({ socketPath: '/var/run/docker.sock' }) | ||
let container | ||
@@ -115,3 +117,3 @@ | ||
let docker = new Docker({ socketPath: '/var/run/docker.sock' }) | ||
const docker = new Docker({ socketPath: '/var/run/docker.sock' }) | ||
let container | ||
@@ -126,3 +128,3 @@ | ||
.then((content) => { | ||
let file = fs.createWriteStream("container.tar"); | ||
const file = fs.createWriteStream("container.tar"); | ||
file.end(content) | ||
@@ -146,3 +148,3 @@ }) | ||
let docker = new Docker({ socketPath: '/var/run/docker.sock' }) | ||
const docker = new Docker({ socketPath: '/var/run/docker.sock' }) | ||
let container | ||
@@ -165,3 +167,3 @@ | ||
.then((stream) => { | ||
let file = fs.createWriteStream("file.jpg"); | ||
const file = fs.createWriteStream("file.jpg"); | ||
stream.pipe(file) | ||
@@ -187,3 +189,3 @@ return promisifyStream(stream) | ||
let docker = new Docker({ socketPath: '/var/run/docker.sock' }) | ||
const docker = new Docker({ socketPath: '/var/run/docker.sock' }) | ||
let _container | ||
@@ -225,3 +227,3 @@ | ||
let docker = new Docker({ socketPath: '/var/run/docker.sock' }) | ||
const docker = new Docker({ socketPath: '/var/run/docker.sock' }) | ||
@@ -251,3 +253,3 @@ var tarStream = tar.pack('/path/to/Dockerfile') | ||
let docker = new Docker({ socketPath: '/var/run/docker.sock' }) | ||
const docker = new Docker({ socketPath: '/var/run/docker.sock' }) | ||
@@ -267,3 +269,3 @@ return docker.image.create({}, { fromImage: 'ubuntu', tag: 'latest' }) | ||
const Docker = require('../lib/docker').Docker, | ||
const Docker = require('node-docker-api').Docker, | ||
fs = require('fs') | ||
@@ -277,3 +279,3 @@ | ||
let docker = new Docker({ socketPath: '/var/run/docker.sock' }) | ||
const docker = new Docker({ socketPath: '/var/run/docker.sock' }) | ||
@@ -280,0 +282,0 @@ docker.events({ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1402423
115
8766
273
15